RailsCasts Pro episodes are now free!

Learn more or hide this

Amiel Martin's Profile

GitHub User: amiel

Site: http://amielmartin.com

Comments by Amiel Martin

Avatar

I put this in my application_helper.rb.
It does the trick quite nicely.

def current_user
  super.decorator
end
Avatar

I tend to store attributes like status or role as underscored strings (a string that would be
suitable for a method/variable name) sometimes a simple .humanize will do the trick when
it comes to displaying that value in the UI user but other times you need to customize
them a bit which is one reason I18n is great

Here's my ApplicationDecorator which helps automate the usage of I18n for
such a purpose.

https://gist.github.com/1338134