I have set up the Model, but I don’t know how to write the code in controller to get result of the following SQL query..
SELECT users.name, events.* FROM users, events WHERE users.id=events.uid
Thanks a lot.
I rename events.uid -> events.user_id
And set up the Model for both of them, attributes of events are
t.integer :user_id
t.string :title
t.datetime :hold_time
t.string :place
t.text :description
And new error is
undefined method title for #<User:0x3fb04d8>
Sorry for bothering you guys..
Assuming you have set up your associations you should be able to do it like so: