Last active
August 29, 2015 14:15
-
-
Save nbrew/45bcf60c69424f0dc56c to your computer and use it in GitHub Desktop.
Monkey Patch for rails 3 and sqlite3 boolean fields
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/initializers/rails3_sqlite3_adapter_patch.rb | |
# source: http://stackoverflow.com/a/20339198/2141283 | |
require 'active_record/connection_adapters/sqlite_adapter' | |
module ActiveRecord | |
module ConnectionAdapters | |
class SQLite3Adapter < SQLiteAdapter | |
def quoted_true; '1' end | |
def quoted_false; '0' end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment