Module: AmazonMarketplace::Helpers::RailsHelper
- Defined in:
- lib/AmazonMarketplace/helpers/rails_helper.rb
Overview
Adds helpers to your views for generating the correct HTML forms and valid signatures.
Instance Method Summary collapse
-
#AmazonMarketplace_form_for(service_name, attributes = {}, submit_tag = nil) ⇒ Object
This is the general interface for generating your Simple Pay service forms.
- #AmazonMarketplace_url_for(service_name, attributes = {}, submit_tag = nil) ⇒ Object
Instance Method Details
#AmazonMarketplace_form_for(service_name, attributes = {}, submit_tag = nil) ⇒ Object
This is the general interface for generating your Simple Pay service forms. See AmazonMarketplace::Services for available services and information specific to each.
Example
(in your view)
<%= AmazonMarketplace_form_for(:service_name, {:attr => 'foo'}) %>
23 24 25 26 |
# File 'lib/AmazonMarketplace/helpers/rails_helper.rb', line 23 def AmazonMarketplace_form_for(service_name, attributes = {}, submit_tag = nil) service = get_AmazonMarketplace_service(service_name) service.generate_form(attributes) end |
#AmazonMarketplace_url_for(service_name, attributes = {}, submit_tag = nil) ⇒ Object
28 29 30 31 |
# File 'lib/AmazonMarketplace/helpers/rails_helper.rb', line 28 def AmazonMarketplace_url_for(service_name, attributes = {}, submit_tag = nil) service = get_AmazonMarketplace_service(service_name) service.generate_url(attributes) end |