Rail 3+ activemerchant: Get data from association class


I’m using ActiveMerchant with Authorize.net and already setup 2 models
Order and Transaction. (#145 Integrating Active Merchant - RailsCasts

I would like to get error message from the transaction if error
occurred then output in flash message. Here is my code:


class OrderTransaction < ActiveRecord::Base
belongs_to :order
serialize :params

def response=(response)
self.success = response.success?
self.authorization = response.authorization
self.message = response.message
self.params = response.params
rescue ActiveMerchant::ActiveMerchantError => e
self.success = false
self.authorization = nil
self.message = e.message
self.params = {}

How do I get those data from OrderTransaction class such as message,
success… in order_controller?

Thank you!