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

Is assets table HAVE TO belongs_to user? #124

Open
adz624 opened this issue Nov 21, 2014 · 1 comment
Open

Is assets table HAVE TO belongs_to user? #124

adz624 opened this issue Nov 21, 2014 · 1 comment

Comments

@adz624
Copy link

adz624 commented Nov 21, 2014

activerecord:

belongs_to RedactorRails.devise_user, :foreign_key => RedactorRails.devise_user_key

controller:
https://github.com/SammyLin/redactor-rails/blob/master/app/controller/redactor_rails/pictures_controller.rb#L6

the logic of above code, looks like must with association with assets table. any idea to skip this for public assets.

@adampope
Copy link

I've just worked around this by adding

private def user
end

in my RedactorRails::Asset model to hide the association that AssetBase implements. Seems to work ok.

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