Read more

Updated: assignable_values can now humanize any given value, even if it's not the current attribute

Henning Koch
July 31, 2012Software engineer at makandra GmbH

You've always been able to access the humanized version for the current value like this:

song = Song.new(:genre => 'pop')
song.humanized_genre # => 'Pop music'
Illustration UI/UX Design

UI/UX Design by makandra brand

We make sure that your target audience has the best possible experience with your digital product. You get:

  • Design tailored to your audience
  • Proven processes customized to your needs
  • An expert team of experienced designers
Read more Show archive.org snapshot

You can now also retrieve the humanized version of any given value by passing it as an argument:

song.humanized_genre('rock') # => 'Rock music'
Posted by Henning Koch to makandra dev (2012-07-31 12:45)