Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Overridden methods #2379

Closed
mainameiz opened this issue Mar 11, 2019 · 1 comment
Closed

Overridden methods #2379

mainameiz opened this issue Mar 11, 2019 · 1 comment

Comments

@mainameiz
Copy link

Hello!

First of all, many thanks for all maintainers of this gem. It became a default gem for handling file uploads for many of us.


I just noticed that carrierwave overrides some useful methods on ActiveRecord models

E.g. reload

def reload(*)
@_mounters = nil
super
end

And initialize_dup

def initialize_dup(other)
@_mounters = nil
super
end

So, if I also want to override these methods (and I do it 🙄) I will break some features of carrierwave. WDYT is it possible to rework this part of code? I will try to make a PR if you are OK with it.

@mainameiz mainameiz changed the title Overriden methods Overridden methods Mar 11, 2019
@mshibuya
Copy link
Member

mshibuya commented May 1, 2019

Thanks for the idea, it would make sense to move them in anonymous module and prepend it in the model.

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

No branches or pull requests

2 participants