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