I'm pretty new to rails, but I've had many years programming in Java.
What I'm looking to find is the rails way of implementing some clean
way of controlling what the user sees based on the user's role.

The Rails Recipes book has a nice clean implementation of user roles
and I've implemented that. What I want to avoid is stuff like

<% if user.admin? %>
  show admin stuff
<% else %>
  show normal user stuff
<% end %>

all over my code. I can think of a couple of ways to do it, but I feel
like I'd be reinventing the wheel and someone certainly has cracked
this nut and at least blogged it some where.

I've tried some Google searches, but it's a hard problem to define in
few enough words to get good results.

Anyone know of any good references for this problem?
-- 
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