Thursday, December 2, 2010

Re: [Rails] Re: CanCan issue when being very specific

According to the wiki.. https://github.com/ryanb/cancan/wiki/Checking-Abilities

I think you may need to change the object that can? is evaluating from the @user variable to the class User like so:

<% if can? :create, User %>
  <div style="clear:both;padding-top:20px;"><%= link_to 'New User', new_user_path %></div>
<% end %>


On Thu, Dec 2, 2010 at 9:37 AM, Leonel *.* <lists@ruby-forum.com> wrote:
Nothing, the New User link it's just not displaying

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.




--
_________________________________

Joshua S. Martin

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate