-
Notifications
You must be signed in to change notification settings - Fork 181
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
stack level too deep when mount on a column named "file" #103
Conversation
@dwilkie I think my solution is pretty straightforward - and the tests are green. Please merge it if you think it's ok or comment what you think I can change to meet with your requirements. Thanks in advance |
@nddeluca it's up to you :) |
@plentz Thanks for solving this! I'm in the process of playing around with this in a rails app. Also, is it possible to add a test so we don't accidentally break this again later? |
@nddeluca I will try to add a test for this and I ping you when it's done. |
Awesome, thanks! |
@nddeluca hey! Just a quick update on this. I just found that the order of things change the behavior! I think we can find a better solution to this problem, since this fails: attr_accessible :file
mount_uploader :file, AttachmentUploader But this works: mount_uploader :file, AttachmentUploader
attr_accessible :file I will look further. |
@plentz why this hasn't been merged? I used this gem and i get that same bug :S what's the problem then? |
@mois3x I didn't created a test to ensure that we don't break this again. If you want to write a test to it, you can make a pull request to my repository https://github.com/plentz/carrierwave_direct and then we merge this alltogheter. |
@plents , could update your repo? i made the test in the updated fork of my repo. anyway i'll make you a pull request and u tellme if i have to do something more again |
👍 The patch fixes the issue here as well. |
Applied in #188. |
If you have you uploader mounted on a column named
file
, like this:You will see a
SystemStackError (stack level too deep)
when trying to usecreate
, like this:It's the same problem related in #10 and #18. I don't know why they closed the other issues, when it's clearly a problem in the gem(in my opinion), since it works with regular carrierwave(and it's pretty hard for a user to figure it out).