I'm upgrading to the latest version of ActiveAdmin and am running into the
following when trying to start the app:
Expected ../app/model/store/base.rb to define Base
base.rb defines base like:
module MyApp
class Store::Base
end
end
I've done some digging and found that ActiveAdmin did some refactoring to
derive everything from a BaseController. It also depends on another gem
(InheritedResources), which does:
self.resource_class ||= begin
namespaced_classes = self.name.sub(/Controller/, '').split('::')
namespaced_class = [namespaced_classes.first,
namespaced_classes.last].join('::').singularize
namespaced_class.constantize
rescue NameError
nil
end
From:
https://github.com/josevalim/inherited_resources/blob/master/lib/inherited_resources/class_methods.rb
So I guess Rails is trying to load the model Base and is wrongly deciding that
my existing base.rb file should take precedence or something, but since it's
not namespaced to just Base it raises this error.
How can I fix this? I've tried loading the ActiveADmin BaseController file in
application.rb, defining a pseudo Base class deriving from BaseController,
etc., but nothing seems to work.
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/rubyonrails-talk/-/rIhC-TTPFvEJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.