search for: some_transaction

Displaying 1 result from an estimated 1 matches for "some_transaction".

2011 Sep 23
1
Simple Association
...essages 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. @request = Message.create(:text => "Some text") @response = Message.create(:text => "Some text back") @some_transaction = Transaction.create(:request => @request.id, :response => @response.id) From there I would like to be able to sort through each transaction: @some_transaction.request.text How are these associations formed? When generating the models do I need to have columns for request/response or reques...