redactor-rails icon indicating copy to clipboard operation
redactor-rails copied to clipboard

Is assets table HAVE TO belongs_to user?

Open adz624 opened this issue 10 years ago • 1 comments

activerecord: https://github.com/SammyLin/redactor-rails/blob/3dead6ade8dd1999aa7e9a8f764a1bd3c2275c49/lib/redactor-rails/orm/active_record.rb#L18

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.

adz624 avatar Nov 21 '14 09:11 adz624

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.

adampope avatar Jul 18 '16 13:07 adampope