Rails cancan gem for not restfull controller -


is possible use cancan load_and_authorize_resource controller different name model?

i mean:

controller name -> entitypropertiescontroller

model name -> property

i don't found way. there work around solution

class entitypropertiescontroller < applicationcontroller   before_filter :authenticate_user!    def index     check_permission   end    def new     check_permission     ...   end    def create     check_permission     ...   end    ...    protected    def check_permission     not_found unless (current_user.admin? || current_user.moderator?)   end end 

Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -