Sign in through GitHub

Please read for an updated status on RailsCasts:

Learn more or hide this

Paul Springett's Profile

GitHub User: paulspringett


Comments by Paul Springett


You might be interested in this gem I made called CSV shaper that allows you to create CSV output using a really nice Ruby DSL.


Thanks for another great episode Ryan!

What would your thoughts on using decorators to show/hide certain information based on the current user's permissions (eg. with CanCan) - by doing something like:

if can? :read, model
  h.link_to, "mailto:#{}"
  content_tag :p, "Not listed", :class => "none"

within the decorator? A use case might be a member directory where non-members can only see members name but logged-in members can see each others email addresses.

Maybe it's a bit of an edge case? Do you think it would appropriate to put authorisation logic in a decorator?