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

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -