Michael Pavling wrote:
> ".class" doesn't return a string, it returns a class...
> 
> <%= content_tag(:li, link_to ("Products", productss_path)) if
> current_user.class == Client %>
> 
> but you might be better using "is_a?(base_class)" - depends what the
> intention of your code is:
> 
> <%= content_tag(:li, link_to ("Products", productss_path)) if
> current_user.is_a?(Client) %>

THANK YOU MICHAEL!

I get the hard stuff working but simple stuff like this gets me stuck 
often. Besides the craziness of the Rails API (although it IS helpful), 
if there a place where I can learn this kind of thing simple thing?

Thanks again!

-Tony
-- 
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-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