Created
December 15, 2015 02:18
-
-
Save p/2d1c26560e63e8850d40 to your computer and use it in GitHub Desktop.
Rails 64 bit primary key fix for sqlite
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
# force load | |
ActiveRecord::Type::Integer | |
class ActiveRecord::Type::Integer | |
def initialize_with_pk_length_fix(options={}) | |
#options = {limit: 8}.update(options) | |
# apparently we are receiving limit: nil in options, override hard | |
options = options.merge(limit: 8) | |
initialize_without_pk_length_fix(options) | |
end | |
alias_method_chain :initialize, :pk_length_fix | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment