On May 10, 2:58 pm, Jacob Patton <[email protected]> wrote:
> @account = Account.find(:first)
> @account.opening_hours.size
> => 2
> @account.opening_hours.for_day_of_week('Monday').size
> => 0
>
> It's that last one, @account.opening_hours.for_day_of_week
> ('Monday').size, that's throwing me. I thought that the Opening
> named_scope should filter the @account's opening_hours, no?
>
> What's going on here (and what am I doing wrong)?
>
Have you looked at the sql this is executing ?
Fred
> thanks very much,
>
> Jacob Patton
--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---