Created
May 3, 2012 13:42
-
-
Save regedarek/2585733 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class FreeRegistrationCouponsController < ApplicationController | |
def send | |
@sender_id = current_user.id | |
binding.pry | |
redirect_to root_path | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resources :free_registration_coupons do | |
collection do | |
get 'send' | |
post 'send' | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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'