Hello, I am new to rails and I need a little help getting started with
a simple association. Here is what I am trying to do.
I have a model, message, which has text and a user (do not need to
worry about associating users to messages right now). These messages
come in and I would like to create a response for each, which itself
is a message. Then I would like to create a transaction paring these
responses and requests.
‘Transaction’ is not going to work as a model name; ActiveRecord
uses that name internally, and redefining it may cause extremely
peculiar malfunctions.
if messages are paired strictly one-to-one with replies, it may make
more sense to omit the intermediate model entirely and just define a
has_one/belongs_to pair.
–Matt J.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.