You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PS: after a cursory Google check there seems to be a bunch of people wondering why AR dynamic methods are causing exceptions, so I think this might help out more than few people
The text was updated successfully, but these errors were encountered:
That might help gauging how insane this is. Obviously calling connection this early might be an issue but I found that this only raises when an AR object is instantiated anyway.
Maybe some people use a virtual attribute for this by hacking the ActiveModel::Dirty.
What happens if the application does not use ActiveRecord models but mongoid? (Does the plugin for mongoid handle stuff like that?)
If we are about to check it, I believe that ArgumentError is the proper error to raise, and better inside the lib/carrierwave/orm/activerecord.rb which handles db layer stuff.
Would you accept a PR that adds AR column checking to
CarrierWave::ActiveRecord#mount_uploader
or is that a bad idea?This is a very obtuse error and I doubt I would have figured out I forgot to run
rake db:migrate
a few years back:PS: after a cursory Google check there seems to be a bunch of people wondering why AR dynamic methods are causing exceptions, so I think this might help out more than few people
The text was updated successfully, but these errors were encountered: