Notes posted by meceo
RSS feed
1 thank
Another usage example
given: order active record class with “state” string field
class Order < ActiveRecord::Base def state @state ||= ActiveSupport::StringInquirer.new(read_attribute(:status)) end end order = Order.new(state: "initial") order.state.initial? #=> true order.state.paid? #=> false