apotonick/representable — Issue #4: Definition's :getter alias should be :from, not :name?
Author: byu
Created: 2012-01-17 05:09:49+00:00
State: open

As of commit e07abbd850c124e42cf4f140541f11eb0d72a919, if we did:

property :title, :from => :display_title

`create_representation_with` method in lib/representable.rb will always get the value from the method 'title', not 'display_title'.

value = send(bin.definition.getter) || bin.definition.default

This is because the bin.definition.getter will always get whatever the 'name' method returns, not the 'from' method...

class Definition declares the alias:

alias_method :getter, :name