Red Squirrel Stumblog RSS

Dave Hoover stumbles through technology

Oct
2nd
Tue
permalink

ActiveRecord predicate method

Keep in mind that you can use a predicate method to access your boolean attributes in the Ruby way.

  placement = ImagePlacement.create!(:ignored => true)
  placement.ignored?  # true