This gem overwrites the "to_s" method for all models that have attributes named:
name, title, short_name, long_name
This is handy because largely you have that one main attribute that is representing your model.
To install this gem, add it to your Gemfile
In your controller:
@company = Company.find(1) @company.name = "Some company"
And in your view:
<%= @company >
It will fire "Some company".
Copyright (c) 2013 Tomislav Car, released under the MIT license