Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Allow configure services for individual attachments #34935
Idea is taken from this comment
This change allows to configure custom services for individual attachments in the following way:
class User < ActiveRecord::Base has_one_attached :avatar, service: :s3 end
If specified service is not properly configured -
In order to migrate existing apps users would have to re-run
On the side note, I've moved
2 times, most recently
Jan 14, 2019
palkan left a comment
Can we make the presence of
Right now we check for it in the macroses (https://github.com/rails/rails/pull/34935/files#diff-fc054319f93d887d4427a7a728670ba9R159), but we still rely on
What about extracting this feature check (say,
4 times, most recently
Jan 18, 2019
referenced this pull request
Jan 31, 2019
Hey all, just came across this PR while browsing other
I just recently opened #35290 that adds the ability to configure attachments.
I don't want to get ahead of myself and assume that change will be accepted. But if it is accepted I wanted to suggest that we could use that same mechanism here when configuring the service.
class User < ApplicationRecord has_one_attached :avatar do |attachment| attachment.service :s3 end end
Just a thought. Thanks!