title: Rails 4 How to redirect from from Model class to Controller action
body: <p>I would like to implement the following logic:<br>
  We interact with our database through normal views. Through the views the
  basic CRUD operations can be performed on database objects. Whenever now a specific boolean (for any record) is set to true  i would like to pass this record to an REST API controller which then build a http string to be send to a known client.</p>
  
  <p>In the model class i observe the needed value with a <code>after_update</code> callback</p>
  
  <pre><code> private
      def check_boolean
          @listofusers ||= Array.new
           if self.boolean_changed?
               @listofusers.push(self)
           end    
               #redirect_to send_updates_path
               #redirect_to :controller =&gt;'api/users',:action=&gt;"send_updates"
        end
  </code></pre>
  
  <p>This is the route i included in my <code>routes.rb</code> to get the named helper</p>
  
  <pre><code>get 'send_updates', to: 'api/user#send_updates', as: :send_updates
  </code></pre>
  
  <p>But i get the following error message:</p>
  
  <pre><code>NoMethodError (undefined method `redirect_to' for #&lt;User:0x00000005abc778&gt;):
  </code></pre>
  
  <p>What is the correct way to redirect to a controller action? Many thanks in advance.</p>