Module: aspmarketplace::Helpers::RailsHelper

Defined in:
lib/aspmarketplace/helpers/rails_helper.rb

Overview

Adds helpers to your views for generating the correct HTML forms and valid signatures.

Instance Method Summary collapse

Instance Method Details

#aspmarketplace_form_for(service_name, attributes = {}, submit_tag = nil) ⇒ Object

This is the general interface for generating your Simple Pay service forms. See aspmarketplace::Services for available services and information specific to each.

Example

(in your view)

<%= aspmarketplace_form_for(:service_name, {:attr => 'foo'}) %>


23
24
25
26
# File 'lib/aspmarketplace/helpers/rails_helper.rb', line 23

def aspmarketplace_form_for(service_name, attributes = {}, submit_tag = nil)
  service = get_aspmarketplace_service(service_name)
  service.generate_form(attributes)
end

#aspmarketplace_url_for(service_name, attributes = {}, submit_tag = nil) ⇒ Object



28
29
30
31
# File 'lib/aspmarketplace/helpers/rails_helper.rb', line 28

def aspmarketplace_url_for(service_name, attributes = {}, submit_tag = nil)
  service = get_aspmarketplace_service(service_name)
  service.generate_url(attributes)
end