Sha256: c89ffb94acefc3fda7b4e8f23a19e5c8924553f5f8a559181f899905209cdda6

Contents?: true

Size: 188 Bytes

Versions: 17

Compression:

Stored size: 188 Bytes

Contents

class Boolean
  def self.parse(value)
    ActiveRecord::Type::Boolean.new.cast(value)
  end
end

class Object
  def yes_no_to_s
    !!self == self ? (self ? 'yes' : 'no') : to_s
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
better_record-0.8.0 config/initializers/core_ext/boolean.rb
better_record-0.7.5 config/initializers/core_ext/boolean.rb
better_record-0.7.4 config/initializers/core_ext/boolean.rb
better_record-0.7.3 config/initializers/core_ext/boolean.rb
better_record-0.7.2 config/initializers/core_ext/boolean.rb
better_record-0.7.1 config/initializers/core_ext/boolean.rb
better_record-0.7.0 config/initializers/core_ext/boolean.rb
better_record-0.6.1 config/initializers/core_ext/boolean.rb
better_record-0.6.0 config/initializers/core_ext/boolean.rb
better_record-0.5.5 config/initializers/core_ext/boolean.rb
better_record-0.5.4 config/initializers/core_ext/boolean.rb
better_record-0.5.1 config/initializers/core_ext/boolean.rb
better_record-0.5.0 config/initializers/core_ext/boolean.rb
better_record-0.4.0 config/initializers/core_ext/boolean.rb
better_record-0.3.0 config/initializers/core_ext/boolean.rb
better_record-0.2.0 config/initializers/core_ext/boolean.rb
better_record-0.1.1 config/initializers/boolean.rb