sorry for the spam. but can i get some feedback related to this proposal, it will be much appreciated.
thank you! On Friday, July 6, 2018 at 5:11:22 PM UTC+3, Hamad Al-Ghanim wrote: > > i have just recently migrated from paperclip to active storage and one of > the differences that i noticed is that active storage doesn't provide a way > to have a default file. i think that adding a helper method is inconvenient > for each model and default file, and checking for the file if it is > attached is also an issue that makes view files larger than it should > > previously we could have a default behavior on paperclip using the > following in our model: > > > has_attached_file :avatar, default_url: "/images/:style/missing.png" > > > i am proposing following to be used for active storage, however if this > cannot be done and someone has a better spec please comment away. > > > has_one_attached :avatar, default_file: "/images/:style/missing.png" # or > somewhere from assets > > > for obvious reasons this shouldn't work on has_many_attached > > i hope this is the correct channel for such an issue, if it is not please > provide me with the correct one > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-core+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-core@googlegroups.com. Visit this group at https://groups.google.com/group/rubyonrails-core. For more options, visit https://groups.google.com/d/optout.