[Rails] Re: Printing field attributes outside the model.find_by_sql
On Apr 10, 7:42 pm, Ad Ber <li...@ruby-forum.com> wrote:
> @p = Pay.find_by_sql("SELECT p.id, p.topic, s.id, s.income, s.price FROM
> pays as P LEFT OUTER JOIN suggests AS s ON s.b_id = p.b_id WHERE
> p.created_at BETWEEN '2008-03-04' AND '2008-07-06' ")
>
[snip]
> <%= form.message %><br />
> It gives me an error missing attribute
Perhaps because you aren't selecting a message attribute in your SQL
statement?
--
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.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home