Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: rm-use-plugin-…
24 lines (19 sloc) 0.37 kb
module ActiveRecord
module Type
class Integer < Value # :nodoc:
include Numeric
def type
:integer
end
alias type_cast_for_database type_cast
private
def cast_value(value)
case value
when true then 1
when false then 0
else value.to_i rescue nil
end
end
end
end
end
Jump to Line
Something went wrong with that request. Please try again.