I have an application in which I use a database that already existed and already has several data that I can not change.
I want to access this data using ActiveRecord, but the problem is that several of these models have a column called hash and ActiveRecord raises the exception:
ActiveRecord::DangerousAttributeError: hash is defined by ActiveRecord
What can I do to not override the hash method and the same time manage to access this column?
Have a look at the safe_attributes gem. Looks like it is built for your problem.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With