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