Code Monkey home page Code Monkey logo

Comments (12)

r-a-o avatar r-a-o commented on July 17, 2024 78

Replace ActiveAdmin.routes(self) with below line in routes.rb

ActiveAdmin.routes(self) rescue ActiveAdmin::DatabaseHitDuringLoad

This fixes the issue.

from acts_as_relation.

gabrieljoelc avatar gabrieljoelc commented on July 17, 2024 19

I ended up converting the scope to a class method as suggested in #71 (comment), but only after trying to figure out what using a proc means for custom filters. @estelleqiu and @zpieslak are you referring to setting the collection option as in the following (see docs):

filter :author, collection: proc { Author.all }

from acts_as_relation.

binhngoc17 avatar binhngoc17 commented on July 17, 2024

I am getting the same error... and I although I have added the acts-as but it still cannot resolve the problem

from acts_as_relation.

hzamani avatar hzamani commented on July 17, 2024

@BattleBrisket comment on #59 is complete

from acts_as_relation.

zpieslak avatar zpieslak commented on July 17, 2024

I had the same issue on the newest master branch (activeadmin/activeadmin/commit/930d34cd224272687613dcf1db4cf5b1347f1098) of active_admin. The thing that caused it, was custom 'filter' options which were not wrapped in proc objects.

from acts_as_relation.

railsfactory-krishnaveni avatar railsfactory-krishnaveni commented on July 17, 2024

Filter part can be changed like this to avoid getting this kind of errors.


ActiveAdmin.register Table do

begin
filter: id
filter: name
rescue
p "msg"
end

end

from acts_as_relation.

wonderer007 avatar wonderer007 commented on July 17, 2024

I was also getting same error on rake db:migrate. I just commented that line and rake db:migrate runs perfectly and comment it after

from acts_as_relation.

kvokka avatar kvokka commented on July 17, 2024

Got the same error.
helped moving in models form scope :foo -> {bar} to def self.foo bar;end for table loading for avoid error

from acts_as_relation.

dpmango avatar dpmango commented on July 17, 2024

@r-a-o It works for me also. Thanks

from acts_as_relation.

estelleqiu avatar estelleqiu commented on July 17, 2024

I find proc{} is work for me.

from acts_as_relation.

pablosistemas avatar pablosistemas commented on July 17, 2024

rescue ActiveAdmin::DatabaseHitDuringLoad

It worked for me too!

from acts_as_relation.

salmagomaa avatar salmagomaa commented on July 17, 2024

#71 (comment)

Thank you!

from acts_as_relation.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.