search for: resource_class

Displaying 2 results from an estimated 2 matches for "resource_class".

2008 Aug 05
1
Rails controller specs and private helper methods
...cryptic have this in my actions: def index @collection = params[''resource_name''].camelize.constantize.find(...) end You get the idea: something very ugly and something that will break if I don''t be careful enough. So I tried to extract it to it''s own method (resource_class), but wrapping my brain to spec it is taking me a while. At this point, I don''t like the feeling that resource_class is being stubbed or expected in some actions, but not actually executed. This is the pastie: http://pastie.org/247678 Do you guys think that will be best to put the reso...
2012 Mar 07
0
LoadError: Expected X to define on gem upgrade
...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 Na...