Re: [Rails] ActiveRecord method

2012-07-04 Thread Colin Law
On 3 July 2012 15:56, Yusuke Enomoto wrote: > Hello.I have a question. I am making chat application to practice RoR. > > I have three models. User, Chat, and Message. > The relationship is that User has many chats(it means chat's host) and many > message,s Chat has many messages. > > Now I want

[Rails] ActiveRecord method

2012-07-03 Thread Yusuke Enomoto
Hello.I have a question. I am making chat application to practice RoR. I have three models. User, Chat, and Message. The relationship is that User has many chats(it means chat's host) and many message,s Chat has many messages. Now I want to create a lobby page like this. http://freezing-sword

[Rails] ActiveRecord method creation issue

2010-01-27 Thread Gal Bar-or
Sorry in advance if this is on the wrong forum/topic. I'm a novice ruby developer, starting to use ActiveRecord, and am getting stuck with the following problem: I have a class defined: class User < ActiveRecord::Base set_table_name "users" has_one :locations has_one :sessions has_many :