makandra / active_type

Make any Ruby object quack like ActiveRecord
MIT License
1.09k stars 74 forks source link

ActiveStorage does not work when using a form object #102

Closed santiagodoldan closed 3 years ago

santiagodoldan commented 6 years ago

I'm using ActiveStorage (http://edgeguides.rubyonrails.org/active_storage_overview.html) in one model, let's say User model. Everything was working ok until I started using a form object to create users, now for some reason the ActiveStorage::Attachment record isn't being created, any ideas? I saw in the Readme that the attributes object gets overridden, not sure if that could be the cause of this issue, I'm debugging a bit on my side.

kratob commented 6 years ago

Unfortunately, I haven't worked with ActiveStorage myself, so I have no idea what the issue might be. It seems likely that there is some interaction with Rails' built-in attribute logic.

foobear commented 4 years ago

Even though the issue is rather old: @santiagodoldan This might have been resolved in 1.4.2 as we fixed assignment through ActiveRecord's internal attribute writers.

santiagodoldan commented 4 years ago

Hey, I don't remember what project I was working at that time, but will try to see if I can reproduce the issue and then try version 1.4.2, thanks for the heads up

judithroth commented 3 years ago

Since it is unclear if the issue is resolved or if anyone still needs that, I'm closing this for now. If someone runs into this again, the issue can be reopened.