ActiveStorage - next steps and how to help?

115 views
Skip to first unread message

Halo

unread,
Oct 3, 2017, 4:52:01 AM10/3/17
to Ruby on Rails: Core

Hello world-changing Rubyists,


I’m experimenting with ActiveStorage and questions popped up. Since they revolve around features, I thought I’d post them here.


Most of the „missing“ features have been listed by the author of Shrine in this reddit post, yet not all of them are necessary to begin using ActiveStorage in production or early alpha.


One feature I find important though is handling validation errors. I don’t want Blobs in my database which are never actually attached to my records. Would that not be the next feature to implement?


That is to say, solving this exclamation-mark riddle in the current README in ActiveStorage:


def create
  message = Message.create! params.require(:message).permit(:title, :content)
  message.images.attach(params[:message][:images])
end


But let’s say that I can work around that with transactions and JS validations, I’d still be facing another problem. I have one S3 bucket per environment and everything neatly organized in directories, yet ActiveSupport clutters up the root directory.


Would that *conceptually* be solved like this commit?


Lastly, if I were to document for developers how to use ActiveStorage (even in this early stage) - would I do that right in the ActiveStorage README? I'm missing the up-to-date equivalent to this section.


Thank you for your guidance.

halo

Halo

unread,
Nov 22, 2017, 4:48:57 AM11/22/17
to Ruby on Rails: Core
The assignment problem I mentioned has been solved yesterday by George Claghorn:

Thank you!

I'm still seeking guidance on the S3 prefix problem, though:

Would a fifth keyword argument to the S3 service be a good approach?

Thank you for your time.
Reply all
Reply to author
Forward
0 new messages