Hmmm...

Hi Rob,

thanks for your reply!

I see how one can validate presence of a blob from this change, but I'm not 
sure what could be the syntax for validating content type, filename, or 
file size after this change. Could you please elaborate on that? The commit 
you referred to provides neither documentation nor tests for these cases.

Best regards,
Ivan

On Monday, November 26, 2018 at 9:53:12 PM UTC+1, Rob Zolkos wrote:
>
> Rails 6 will have validations for AS  
> https://github.com/rails/rails/commit/e8682c5bf051517b0b265e446aa1a7eccfd47bf7#diff-c76fb6202b7f95a08fe12f40c4999ac9R11
>
> On Mon, Nov 26, 2018 at 3:36 PM <ifom...@gmail.com <javascript:>> wrote:
>
>> Hi all,
>>
>> I think this is one of the essential features that are missing in Active 
>> Storage. Thus I'm pretty sure it's gonna be implemented pretty soon one way 
>> or another, and I wonder what is the maintainers' plan for it, if there is 
>> any.
>>
>> I know about active_storage_validations gem, but its functionality is 
>> quite limited and the gem itself is pretty self-inconsistent and raw 
>> (though it's the best publicly available gem I could find, kudos to the 
>> maintainers!)
>>
>> One approach I'm thinking of would be to adapt paperclip's validators for 
>> Active Storage (thanks to MIT license), and I think I could do it, but I'm 
>> not sure if it's gonna be accepted. One doesn't have to invent the wheel, 
>> but I'd like to hear an expert opinion.
>>
>> Thank you,
>>
>> Ivan
>>
>> -- 
>> 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-co...@googlegroups.com <javascript:>.
>> To post to this group, send email to rubyonra...@googlegroups.com 
>> <javascript:>.
>> Visit this group at https://groups.google.com/group/rubyonrails-core.
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
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.

Reply via email to