Last active
November 26, 2015 07:49
-
-
Save kazu69/da4db6ba0b96673840a5 to your computer and use it in GitHub Desktop.
Rails tinyint(1) use boolean false http://blog.kazu69.net/2015/10/22/active-record-tinyint/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# config/application.rb | |
require 'active_record/connection_adapters/mysql2_adapter' | |
ActiveRecord::ConnectionAdapters::Mysql2Adapter.emulate_booleans = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class StoreListing < ActiveRecord::Base | |
attribute :price_in_cents, Type::Integer.new | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment