Open markalanevans opened 9 years ago
add a file activeuuid.rb in your project config/initializers will fix this issues
ActiveRecord::Base.connection_pool.with_connection do
ActiveUUID::Patches.apply!
end
Why is this needed? I see the patches being applied in the code here:
https://github.com/jashmenn/activeuuid/blob/master/lib/activeuuid.rb#L9
And here:
https://github.com/jashmenn/activeuuid/blob/master/lib/activeuuid/railtie.rb#L9
On this line: https://github.com/jashmenn/activeuuid/blob/master/lib/activeuuid/uuid.rb#L146
self.class.columns_hash[primary_key].type => binary
which != :uuid
The db is mysql, i'm using the mysql2 gem and the field is a binary 16 field in the DB.
Version
activeuuid (0.6.0) activerecord (>= 3.1) uuidtools