Permalink
Browse files

AttributeMethods refector suffix method added some usages

  • Loading branch information...
vishnuatrai authored and fxn committed Aug 5, 2011
1 parent 7963099 commit 9eb3e637fb7ffa7a35847b5dd577c3a2736e5101
Showing with 12 additions and 1 deletion.
  1. +12 −1 railties/guides/source/active_model_basics.textile
@@ -30,12 +30,23 @@ private
end
def attribute_highest?(attribute)
attribute > 100 ? true : false
send(attribute) > 100 ? true : false
end
end
person = Person.new
person.age = 110
person.age_highest? # true
person.reset_age # 0
person.age_highest? # false
</ruby>
h4. Callbacks
h3. Changelog
* August 5, 2011: Initial version by "Arun Agrawal":http://github.com/arunagw

0 comments on commit 9eb3e63

Please sign in to comment.