You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems spurious to have resources saved at files/resource/{id} instead of simply files/{id}. Was the idea here that people can subclass Resource? (Even if they do, {id} will keep things unique.)
I recommend changing
def store_dir
"files/#{model.class.to_s.underscore}/#{model.id}"
end
to
def store_dir
"files/#{model.id}"
end
in app/uploaders/resource_uploader.rb
(Alternatively, if the model name is kept, would make more sense to be at #{model.class.to_s.pluralize.underscore})
The text was updated successfully, but these errors were encountered:
It seems spurious to have resources saved at
files/resource/{id}
instead of simplyfiles/{id}
. Was the idea here that people can subclass Resource? (Even if they do, {id} will keep things unique.)I recommend changing
to
(Alternatively, if the model name is kept, would make more sense to be at
#{model.class.to_s.pluralize.underscore}
)The text was updated successfully, but these errors were encountered: