Hi All,
I have Model called pays..and it has fields like(id, topic, subject,
created_at, b_id) and i also have a Model called suggests with
fields(id, income, price, b_id)
In my ruby on rails action or method Controller:
def print_two_table
@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' ")
end
In my View action or method:
<%= @p.each do |form| %>
<%= form.message %><br />
<%= form.income %><br /> (error on this part)
<% end %>
It gives me an error missing attribute
What i want to accomplish is to be able to print field attributes in the
suggests model or table. Any help is appreciated..TY.
--
Posted via http://www.ruby-forum.com/.
--
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.