Hi all
I have created quite a useful module:
ActsAsManager
def new
...
end
def edit
...
end
...
end
that adds methods to a controller to do all the CRUD stuff in a very
dynamic way.
So far I just added an include ActsAsManager to every controller that
needed it. But now that''s not enough anymore, because I need some
controllers to add only e.g. the "edit" method etc. What''s
the most
conform way to do that?
I thought about something like that:
class Admin::CountriesController < Admin::ApplicationController
acts_as_manager :except => :destroy
end
or
class MemberController < ApplicationController
acts_as_manager :only => [:show, :edit]
end
But how can I do that? I''m not very familiar with dynamic class
extension...
Thanks a lot for input,
Josh
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---