On Nov 20, 10:04 pm, "Jose tomas R." <li...@ruby-forum.com> wrote:
> Rails is throwing this error
>
> C:/Ruby/Depot/app/views/products/index.html.erb:28: syntax error,
> unexpected tSTRING_BEG, expecting keyword_do or '{' or '('
> ...er.privilege == 50 ? {link_to 'Show', product} : 'a'  );@out...
>
> in line
>
> <%= current_user.privilege == 50 ? {link_to 'Show', product} : 'a'  %>

I think you meant those to be () rather than {}

Fred
>
> current_user at ApllicationController
>
> def current_user
>    return unless session[:user_id]
>   �...@current_user ||= User.find_by_id(session[:user_id])
> end
>
> --
> Posted viahttp://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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to