Ruby on Rails
Friday, September 4, 2015
There are no errors given. Instead rails puts result of Chat.find_by(id: 6).chatusers, not result of "each", that's strange.
-- class Chatuser < ActiveRecord::Base
self.table_name = "chats_users"
belongs_to :chat
belongs_to :user
validates :chat_id, presence: true
validates :user_id, presence: true
end
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/3ba9d885-0e29-4f76-995e-93c1b949f637%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment