I''m trying out inherited_resources and so far so good. However, one
problem I''ve run into is that it''s very difficult to customize
inherited_resource behaviour in subclasses. Looking through the
source I see it uses things like undef_method and class_attribute.
For example, if I have the following controllers:
class ItemsController
inherit_resources
actions :new, :create
def create
# custom stuff here
creat!
end
end
class VideoController < ItemsController
actions :new, :create, :show
end
videos controller will not respond to /show because
inherited_resources undefined it in ItemsController. One thing I
tried was to call inherit_resources again at the top of
VideoController, so it reloads all of inherited_resources default
actions, but also over-writes the custom :create action in
ItemsController
Am I overlooking something or is IR not supposed to be used for
inheritance like this?
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.