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

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -