On 2 February 2014 13:57, Frederick Cheung <[email protected]> wrote:
> ...
> You could update params in place , ie params.merge!(...).

Would that not use the value from defaults if it was already present in params?

>
> Personally I wouldn't do this. I'd be more likely to have a controller method 
> called something like get_date_range that would get the dates from params 
> that would do things like parse the strings into actual dates and/or replace 
> missing params with defaults.

+1

Colin

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLtrTpirQ8uOcMZLPEvajeAk9cOs-JanZp%3D7EMOjq_qGjA%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to