Permalink
Browse files

Extend submit_tag

submit_tag helper can receive any options now
  • Loading branch information...
1 parent 8d9b8cf commit 89248c9e1aa86e89bc77d6d73063f3c4a125e7e0 Cirdes Henrique committed Apr 17, 2012
Showing with 61 additions and 64 deletions.
  1. +58 −60 Gemfile.lock
  2. +1 −1 app/views/pagseguro/_pagseguro_form.html.erb
  3. +2 −3 lib/pagseguro/helper.rb
View
@@ -6,101 +6,99 @@ PATH
GEM
remote: http://rubygems.org/
specs:
- actionmailer (3.1.1)
- actionpack (= 3.1.1)
- mail (~> 2.3.0)
- actionpack (3.1.1)
- activemodel (= 3.1.1)
- activesupport (= 3.1.1)
+ actionmailer (3.2.3)
+ actionpack (= 3.2.3)
+ mail (~> 2.4.4)
+ actionpack (3.2.3)
+ activemodel (= 3.2.3)
+ activesupport (= 3.2.3)
builder (~> 3.0.0)
erubis (~> 2.7.0)
- i18n (~> 0.6)
- rack (~> 1.3.2)
- rack-cache (~> 1.1)
- rack-mount (~> 0.8.2)
+ journey (~> 1.0.1)
+ rack (~> 1.4.0)
+ rack-cache (~> 1.2)
rack-test (~> 0.6.1)
- sprockets (~> 2.0.2)
- activemodel (3.1.1)
- activesupport (= 3.1.1)
+ sprockets (~> 2.1.2)
+ activemodel (3.2.3)
+ activesupport (= 3.2.3)
builder (~> 3.0.0)
- i18n (~> 0.6)
- activerecord (3.1.1)
- activemodel (= 3.1.1)
- activesupport (= 3.1.1)
- arel (~> 2.2.1)
+ activerecord (3.2.3)
+ activemodel (= 3.2.3)
+ activesupport (= 3.2.3)
+ arel (~> 3.0.2)
tzinfo (~> 0.3.29)
- activeresource (3.1.1)
- activemodel (= 3.1.1)
- activesupport (= 3.1.1)
- activesupport (3.1.1)
+ activeresource (3.2.3)
+ activemodel (= 3.2.3)
+ activesupport (= 3.2.3)
+ activesupport (3.2.3)
+ i18n (~> 0.6)
multi_json (~> 1.0)
- arel (2.2.1)
+ arel (3.0.2)
builder (3.0.0)
diff-lcs (1.1.3)
erubis (2.7.0)
fakeweb (1.3.0)
hike (1.2.1)
i18n (0.6.0)
- json (1.6.1)
- mail (2.3.0)
+ journey (1.0.3)
+ json (1.6.6)
+ mail (2.4.4)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
- mime-types (1.17.2)
- multi_json (1.0.3)
- nokogiri (1.5.0)
+ mime-types (1.18)
+ multi_json (1.3.1)
+ nokogiri (1.5.2)
polyglot (0.3.3)
- rack (1.3.5)
- rack-cache (1.1)
+ rack (1.4.1)
+ rack-cache (1.2)
rack (>= 0.4)
- rack-mount (0.8.3)
- rack (>= 1.0.0)
rack-ssl (1.3.2)
rack
rack-test (0.6.1)
rack (>= 1.0)
- rails (3.1.1)
- actionmailer (= 3.1.1)
- actionpack (= 3.1.1)
- activerecord (= 3.1.1)
- activeresource (= 3.1.1)
- activesupport (= 3.1.1)
+ rails (3.2.3)
+ actionmailer (= 3.2.3)
+ actionpack (= 3.2.3)
+ activerecord (= 3.2.3)
+ activeresource (= 3.2.3)
+ activesupport (= 3.2.3)
bundler (~> 1.0)
- railties (= 3.1.1)
- railties (3.1.1)
- actionpack (= 3.1.1)
- activesupport (= 3.1.1)
+ railties (= 3.2.3)
+ railties (3.2.3)
+ actionpack (= 3.2.3)
+ activesupport (= 3.2.3)
rack-ssl (~> 1.3.2)
rake (>= 0.8.7)
rdoc (~> 3.4)
thor (~> 0.14.6)
rake (0.9.2.2)
- rdoc (3.11)
+ rdoc (3.12)
json (~> 1.4)
- rspec (2.7.0)
- rspec-core (~> 2.7.0)
- rspec-expectations (~> 2.7.0)
- rspec-mocks (~> 2.7.0)
- rspec-core (2.7.1)
- rspec-expectations (2.7.0)
- diff-lcs (~> 1.1.2)
- rspec-mocks (2.7.0)
- rspec-rails (2.7.0)
- actionpack (~> 3.0)
- activesupport (~> 3.0)
- railties (~> 3.0)
- rspec (~> 2.7.0)
- sprockets (2.0.3)
+ rspec (2.9.0)
+ rspec-core (~> 2.9.0)
+ rspec-expectations (~> 2.9.0)
+ rspec-mocks (~> 2.9.0)
+ rspec-core (2.9.0)
+ rspec-expectations (2.9.1)
+ diff-lcs (~> 1.1.3)
+ rspec-mocks (2.9.0)
+ rspec-rails (2.9.0)
+ actionpack (>= 3.0)
+ activesupport (>= 3.0)
+ railties (>= 3.0)
+ rspec (~> 2.9.0)
+ sprockets (2.1.2)
hike (~> 1.2)
rack (~> 1.0)
- tilt (~> 1.1, != 1.3.0)
- sqlite3 (1.3.4)
+ tilt (!= 1.3.0, ~> 1.1)
+ sqlite3 (1.3.6)
thor (0.14.6)
tilt (1.3.3)
treetop (1.4.10)
polyglot
polyglot (>= 0.3.1)
- tzinfo (0.3.31)
+ tzinfo (0.3.33)
PLATFORMS
ruby
@@ -21,6 +21,6 @@
<%= hidden_field_tag PagSeguro::Order::BILLING_MAPPING[name.to_sym], value %>
<% end %>
- <%= submit_tag options[:submit], :class => options[:class] %>
+ <%= submit_tag value, options%>
</div>
</form>
View
@@ -1,6 +1,5 @@
module PagSeguro::Helper
- def pagseguro_form(order, options = {})
- options.reverse_merge!(:submit => "Pagar com PagSeguro")
- render :partial => "pagseguro/pagseguro_form", :locals => {:options => options, :order => order}
+ def pagseguro_form(order, value = "Pagar com PagSeguro", options = {})
+ render :partial => "pagseguro/pagseguro_form", :locals => {:value => value, :options => options, :order => order}
end
end

0 comments on commit 89248c9

Please sign in to comment.