paysio 1.0.9 → 1.0.10

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.9
1
+ 1.0.10
@@ -3,7 +3,7 @@ module Paysio
3
3
  attr_accessor :params, :values, :errors, :html_options
4
4
 
5
5
  def initialize(params = {})
6
- @params = options[:params]
6
+ @params = params
7
7
  @values = {}
8
8
  @errors = {}
9
9
  @html_options = {}
@@ -29,14 +29,18 @@ module Paysio
29
29
 
30
30
  def render_html
31
31
  html = <<-TEXT
32
- <form id="#{@html_options[:id] || 'paysio'}" class="#{@html_options[:class]}"></form>
32
+ <form id="#{html_options[:id] || 'paysio'}"
33
+ class="#{html_options[:class]}"
34
+ action="#{html_options[:action] || '#'}"
35
+ method="#{(html_options[:method] || 'post').upcase}"
36
+ ></form>
33
37
  TEXT
34
38
  end
35
39
 
36
40
  private
37
41
  def javascript_form_params
38
- params_html = "$('##{@html_options[:id]}'), #{@params.to_json}, #{@values.to_json}"
39
- params_html << ", #{@errors.to_json}" if @errors.present?
42
+ params_html = "$('##{html_options[:id] || 'paysio'}'), #{params.to_json}, #{values.to_json}"
43
+ params_html << ", #{errors.to_json}" if errors.present?
40
44
  params_html
41
45
  end
42
46
  end
@@ -1,3 +1,3 @@
1
1
  module Paysio
2
- VERSION = '1.0.9'
2
+ VERSION = '1.0.10'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paysio
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.9
4
+ version: 1.0.10
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: