def length=(minutes)
self[:length] = minutes * 60
end
def length
self[:length] / 60
end
Last active
August 29, 2015 14:15
-
-
Save oojikoo-gist/6c8104657995038c24ab to your computer and use it in GitHub Desktop.
rails: how to overwrite get and set methods
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment