title: Access a model method from a controller
body: <p>I am relatively new to rails and am trying to figure this out the right syntax for the following</p>
  
  <p>I have a model Transactions with the method </p>
  
  <pre><code> def self.add_external_transaction_for information
  ...
  end
  </code></pre>
  
  <p>declared in transaction.rb</p>
  
  <p>What I am trying to do is call add_external_transaction_for from a different controller named DepositsController for the Deposit model like this in deposits_controller.rb</p>
  
  <pre><code>ActiveRecord::Transactions.add_external_transaction_for(@deposit)
  </code></pre>
  
  <p>however i see the following error</p>
  
  <pre><code>undefined method `add_external_transaction_for' for ActiveRecord::Transactions:Module
  </code></pre>
  
  <p>Can someone please help me. I need to be able to have a method that is associated with the Transaction model that is accessed from a controller without me having to create a new instance of Transaction just to access that method</p>