[Rails-core] Proposal: Multiple Validation Contexts

2015-09-30 Thread Nam Chu Hoai
Hey all,

Validations are a relatively obscure and not particularly well documented 
feature that do come in handy when using particularly complex models with 
complex lifecycles and states. Ideally, I'd use Concerns to dynamically add 
validations but that hasn't been proven fruitful. I was wondering what you 
guys and gals think of extending validation contexts to be an array, so 
that one could pass in multiple contexts?

Nam

-- 
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 http://groups.google.com/group/rubyonrails-core.
For more options, visit https://groups.google.com/d/optout.


Re: [Rails-core] Proposal: Multiple Validation Contexts

2015-09-30 Thread Kasper Timm Hansen
Already on master: https://github.com/rails/rails/pull/21069.

Reported in This Week in Rails here: 
https://rails-weekly.ongoodbits.com/2015/09/11/performance-mysql-prepared-statements-and-more
 ;)

> Den 29. sep. 2015 kl. 20.17 skrev Nam Chu Hoai :
> 
> Hey all,
> 
> Validations are a relatively obscure and not particularly well documented 
> feature that do come in handy when using particularly complex models with 
> complex lifecycles and states. Ideally, I'd use Concerns to dynamically add 
> validations but that hasn't been proven fruitful. I was wondering what you 
> guys and gals think of extending validation contexts to be an array, so that 
> one could pass in multiple contexts?
> 
> Nam
> 
> -- 
> 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 http://groups.google.com/group/rubyonrails-core 
> .
> For more options, visit https://groups.google.com/d/optout 
> .

--
Kasper

-- 
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 http://groups.google.com/group/rubyonrails-core.
For more options, visit https://groups.google.com/d/optout.


Re: [Rails-core] Proposal: Multiple Validation Contexts

2015-09-30 Thread Nam Chu Hoai
Woo! Thank you so much.

On Wednesday, September 30, 2015 at 3:19:41 PM UTC-4, Kasper Timm Hansen 
wrote:
>
> Already on master: https://github.com/rails/rails/pull/21069.
>
> Reported in This Week in Rails here: 
> https://rails-weekly.ongoodbits.com/2015/09/11/performance-mysql-prepared-statements-and-more
>  
> ;)
>
> Den 29. sep. 2015 kl. 20.17 skrev Nam Chu Hoai  >:
>
> Hey all,
>
> Validations are a relatively obscure and not particularly well documented 
> feature that do come in handy when using particularly complex models with 
> complex lifecycles and states. Ideally, I'd use Concerns to dynamically add 
> validations but that hasn't been proven fruitful. I was wondering what you 
> guys and gals think of extending validation contexts to be an array, so 
> that one could pass in multiple contexts?
>
> Nam
>
> -- 
> 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 .
> To post to this group, send email to rubyonra...@googlegroups.com 
> .
> Visit this group at http://groups.google.com/group/rubyonrails-core.
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> Kasper
>
>

-- 
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 http://groups.google.com/group/rubyonrails-core.
For more options, visit https://groups.google.com/d/optout.