Aaron Belsham

Joined

2,810 Experience
27 Lessons Completed
0 Questions Solved

Activity

In reference to the ActionMailer documentation stating Sidekiq should be started to listen on the mailer queue, how does one ensure the hatchbox deployment handles this?

In the documentation it states we need the mailers queue to be listened for specifically:
bundle exec sidekiq -q default -q mailers
Hey Chris,

Thanks for the answer, yes, at a high level that seems like a reasonable way to go about it, I think the flexibility of calling model.images scoped by the relevant order probably beats that at this time though so probably not worth the pain to migrate completely just for a simple bit of form magic!

I had always imagined ActiveStorage would end up with some kind of generator similar to ActiveRecord to allow this kind of extra rails goodness to be applied like adding your own properties to the attachments, scope the has_many_attacheds and so on.

Cheers

Aaron


Hey there,

Just wondering if anyone can shed some light here as the Google search is pretty thin right now for ActiveStorage.

Is there a way to a a property (say sort_order) to each of the has_many_attached objects and then later be able to re-sort those without having to wrap the ActiveStorage items beneath a has_many associated model, e.g Image which itself has_attached a single attachment.

A working example is a classified advertisement that has many images, currently we have a has_many association to Image, but wanting to simply the creation process to take advantage of a multi-select option on the form upload.

Cheers

Aaron
logo Created with Sketch.

Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

© 2020 GoRails, LLC. All rights reserved.