Ruby on Rails Monday, November 15, 2010

On Mon, Nov 15, 2010 at 6:24 PM, Erol Fornoles <erol.fornoles@gmail.com> wrote:

Assuming your :dob is a date

Try :conditions => ['dob BETWEEN ? AND ?', Date.today.beginning_of_year, Date.today.end_of_year]

Wait let me correct that, but first, is :current_year a field or column in your table or a parameter that was meant to be passed to the named_scope?

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment