Say I have a Dog , and I want to save if it is trained in Rails. Typically, Ruby methods that return boolean names have names ending in ? . Should I call the trained? database column trained? , or should I call the trained database column and have a method
class Dog def trained? trained end end
The latter option seems inefficient, especially when I have a lot of logical fields.
Or is there some other alternative that I am missing?
ruby ruby-on-rails
Peter 06 Oct '09 at 7:53 2009-10-06 07:53
source share