ruby on rails - Skip authorize resource in devise -
I am trying to create a user profile in a project that is working on anyone on the web. , So I tried to add skip_authorize_resource: only = & gt; [: Show]
However for user control and user model, when I do not see anything on / users / 1
and when I add it to the controller, let me login Indicate; When I add it to the model, I get an error message:
undefined method `skip_authorize_resource '
I think you can use the authenticate_user
method
skip_before_filter: authenticate_user !,: only = & Gt; : Show
or you
using check_anage
method in controller
Like this
class ApplicationController & lt; ActionController :: Base check_authorities: as long as & gt; : Do_not_check_authorization? Private def do_not_check_authorization? ... End End
Comments
Post a Comment