Skip to content
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

AR will_change! and :mount_on #274

Closed
indrekj opened this issue Apr 6, 2011 · 2 comments
Closed

AR will_change! and :mount_on #274

indrekj opened this issue Apr 6, 2011 · 2 comments

Comments

@indrekj
Copy link
Contributor

indrekj commented Apr 6, 2011

mount_uploader :avatar, AvatarUploader, :mount_on => :avatar_name

When I upload a new avatar then I get an error:
NoMethodError (undefined method `avatar_will_change!' for #<>.

This is because carrierwave/orm/activerecord.rb doesn't respect mount_on parameter.

@trevorturk
Copy link
Contributor

Ah, yes, I think this line needs to respect the mount_on option:

https://github.com/jnicklas/carrierwave/blob/126832280f34be8cc90ba296bbff4e662368ed3f/lib/carrierwave/orm/activerecord.rb#L33

Any chance you could work up a pull request (with a new test) ?

@indrekj
Copy link
Contributor Author

indrekj commented Apr 7, 2011

#276
Here. I hope it is good enough. I'm not very familiar with this gem source code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants