Hello All,
Controller code
---------
@dates = Q.find(:all,
:select => 'year(q.approved_at) as y, month(q.approved_at) as m, day
(q.approved_at) as d, count(*) as cnt',
other conditions
View code
---------
<% y = '' %>
<% for d in @dates
if y.to_s != d.y.to_s
the new rails 2.2.2 says that
"Attempt to call private method
....attribute_methods.rb:236:in `method_missing'
How I should write my code, so I can select not only the Q table
fields, but also calculated fields ?
Regards,
Pavel
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---