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
irb(main):012:0> Transaction[3].remove NoMethodError: undefined method 'timestamp=' for #<Transaction:0x0000561b588b76e8>
I have the same problem when try to delete object with the attribute, deleted from model before
Maybe just having more explicit exceptions that suggest the standard solution to the problem would be enough?
@katecanaveral this happens because you'd have to set to nil the attribute in all objects before you remove attribute :timestamp from your code, since the Transaction#timestamp and Transaction#timestamp= methods are defined by Ohm when attribute is present.
If I'm not mistaken, the process would be:
Set all Transaction#timestamp to nil - with a migration-like script or manually.
When I change my model, any fields that are still present in Redis cause a NoMethodError, e.g.
Is there any way to get Ohm to ignore any fields from Redis that are not in the model? - or is there some other recommended strategy to handle this?
The text was updated successfully, but these errors were encountered: