ruby on rails - Active Admin before filter for namespace only -
i have namespace admin. apply before_filter namespace (not default one, superuser).
i can add following code in active_admin.rb
ns.before_filter :is_subscribed? but then, superuser gets filter too.
i tried adding before_filter inside namespace configuration :
config.namespace :admin |ns| ... ns.before_filter :is_subscribed? end but rails throws error :
undefined method `before_filter' #<activeadmin::namespace:0x007fa2e0f75f00>
you add controller before_filter in controllers in namespace inherit controller?
ie. adminbasecontroller.
Comments
Post a Comment