I\'m a newb at programming but in my application I want certain cases to display \"yes\" or \"no\" instead of \"true\" or \"false\". I\'m not sure the best way to do this,
Assuming you have :boolean attribute in your model/database, you can do this:
:boolean
class Foo < ActiveRecord::Base def bar self[:bar] ? 'Yes' : 'No' end end
The whenever you want the "Yes"/"No" value, call @foo.bar. Whenever you want the true/false value, call @foo.bar? or @foo[:bar].
@foo.bar
true
false
@foo.bar?
@foo[:bar]