-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#{column}_url equals to nil after saving object #2253
Comments
I'm having the same issue. |
I believe I am experiencing this exact same issue and it seems to be exhibiting itself inside of my test suite. I hand off to a background worker where the ProductTest is updated and then have been running the following commands to compare the response.
It seems that the reload is not properly refreshing the file, even though it did previously on Carrierwave (0.11.2) and carrierwave-mongoid (0.9.0) I was originally going to post this on carrierwave-mongoid however it seems this issue already closely resembles my issues so I'm unsure if the issue is here or carrierwave-mongoid. This is now happening for me one |
Just wanted to bump this and see if there is any other info I can provide to help get this issue fixed? It is blocking a few other tasks I have so if there is anything I can do or provide please let me know. |
I seem to be having the same issue in Rails 5.2 and Carrierwave 1.2.2. The object returned after saving returns |
I might have a look at the code and submit a PR if I find the time. |
I think the problem is in the following code: carrierwave/lib/carrierwave/mounter.rb Line 35 in 97c028c
When a model is initialized before the identifier is set This did work differently in
So a fix will probably be to move the call to |
Unsetting the
|
I don't understand what makes the attribute and |
Stale, please reopen on update. |
I came across an issue trying to save an image. I'm submitting a form with an image, and update an existing record with it. I'm doing through an xhr request from the client, and I want the request to send the image url back.
Carriewave's doc specifies:
Will help me get my file url. However my action returns nil but it works if I instantiate a new version of the record:
I did some testing in the console to show my point:
So the only way I can get the url of the image without having to fetch the record again, after having a look at the uploader object is through:
Config:
Rails 5.1.4
Carrierwave 1.2.1
The text was updated successfully, but these errors were encountered: