title: Call method after submitting form Rails
body: <p>I have the following model:</p>
  
  <pre><code>class Coupon &lt; ActiveRecord::Base
    belongs_to :company
  
    validates :description, presence: true, length: { maximum: 50 }, uniqueness: { case_sensitive: false }
    validates :fine_print, presence: true
  end
  </code></pre>
  
  <p>and the following method in the coupon controller:</p>
  
  <pre><code>def redeem
    if params[:pin] == @coupon.company.pin
      redirect_to root_path
    else
      flash.now[:notice] = "Incorrect Pin"
      render :show
    end
  end
  </code></pre>
  
  <p>This form is in the a view:</p>
  
  <pre><code>&lt;%= form_for( @coupon, :url =&gt; coupons_redeem_path( @coupon ), :html =&gt; { :method =&gt; :post } ) do |f| %&gt;
    &lt;%= label_tag("pin", "Search for:") %&gt;
    &lt;%= text_field_tag("pin") %&gt;
    &lt;%= f.submit "Close Message" %&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>I want the form to call the redeem method in the coupons controller when hitting submit but am getting this error:</p>
  
  <p>No route matches [POST] "/coupons/redeem.1"</p>
  
  <p>EDIT</p>
  
  <p>These are my routes:</p>
  
  <pre><code>resources :companies do 
    resources :coupons
  end
  get 'coupons/redeem'
  </code></pre>