On Wednesday, July 9, 2014 7:02:09 AM UTC+2, Ruby-Forum.com User wrote:
>
> I am using Ruby 2.0.0 and Rails 4.0.5. I follow "Ruby on Rails tutorial 
> by Michael Hartl". 
>
> I am trying to implement **"The destroy action"** (section 9.4.2). 
>
> Administrative users should see delete link 
>
> BUT 
>
> When i sign in, delete link is not appear. I can't able to solve this 
> issue. 
>
> Test suite run successfully. 
>
> >>My application.js file contain: 
>
> //= require jquery 
> //= require jquery_ujs 
> //= require turbolinks 
> //= require bootstrap 
> //= require_tree . 
>
> >> _user.html.erb: 
>
> <li> 
>   <%= gravatar_for user, size: 52 %> 
>   <%= link_to user.name, user %> 
>   <% if current_user.admin? && !current_user?(user) %> 
>     | <%= link_to 'delete', user, method: :delete, 
>                                   data: { confirm: "You sure?" } %> 
>   <% end %> 
> </li> 
>
> I attache user_pages_spec.rb file. Please find it. 
>
> How to fix this error? 
>
> Kind regards 
>
> Attachments: 
> http://www.ruby-forum.com/attachment/9872/user_pages_spec.rb 
>
>
> -- 
> Posted via http://www.ruby-forum.com/. 
>

How do you sign in , - as admin or not ? That's the question :)

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/5517f187-2a25-4a74-badb-052b649b09ca%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to