Skip to content

Instantly share code, notes, and snippets.

@regedarek
Created May 3, 2012 13:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save regedarek/2585733 to your computer and use it in GitHub Desktop.
Save regedarek/2585733 to your computer and use it in GitHub Desktop.
<div class="span6">
<b>Give three of your friends a free registration</b>
<%= form_tag :controller => 'free_registration_coupons', :action => "send" do %>
<%= label_tag :recipient_email_1 %>
<%= text_field_tag :recipient_email_1 %>
<%= label_tag :recipient_email_2 %>
<%= text_field_tag :recipient_email_2 %>
<%= label_tag :recipient_email_3 %>
<%= text_field_tag :recipient_email_3 %>
<%= submit_tag %>
<% end %>
</div>
class FreeRegistrationCouponsController < ApplicationController
def send
@sender_id = current_user.id
binding.pry
redirect_to root_path
end
end
resources :free_registration_coupons do
collection do
get 'send'
post 'send'
end
end
@regedarek
Copy link
Author

ArgumentError in FreeRegistrationCouponsController#send

wrong number of arguments (2 for 0)
Rails.root: /Users/regedarek/code/wifiname

Application Trace | Framework Trace | Full Trace
app/controllers/free_registration_coupons_controller.rb:2:in `send'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment