bootstrap_validator_rails 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 76884f27c86521bfb04159ef0ed796ea091e6ef5
4
- data.tar.gz: e140912b54173a1cbcc71bf37d2290cd4572c153
3
+ metadata.gz: 6ff3c7a502915bd0100cc7aadeec7aca12f88d2b
4
+ data.tar.gz: b743741e1d8af8f146dca1f1bf1d8cfba63f98b3
5
5
  SHA512:
6
- metadata.gz: 99016990d8adb95c6842462e47f2e90f7f4b025ed688e9db488de98760a7d6fc91fce8d9742c14f63c30307487b4eade69ceda0e559cbca298d85caa830199d4
7
- data.tar.gz: bb55283716c6495ed945c0dc51cb1dbe92770fc16c77b1bf55ad10f449cdaf0c4e9f9bc4942867598c8879fd23812d4a90f930c84ee34ba3cba474e887d3baa9
6
+ metadata.gz: c8bb6cad41c550caeea03c2dff003263e114006bb58af525e31480f2437a44f6217f6c5f45535702a88725ca7933e8601c43e452f87a6a434eb1685d4e37c25b
7
+ data.tar.gz: eec4cf2e1681a0e8cf8fc1949dbbc317c8439d7ada9ee39fe191475c1c0218b6f7cf710c64cb7ef98fc40b659782da414d9d84adc1002d80197bc4a9ebd88be0
@@ -7,12 +7,13 @@ module BootstrapValidatorRails
7
7
  super
8
8
  end
9
9
 
10
- def text_field(method, options = {})
11
- attribute = @attributes.validator_data(method)
12
-
13
- options[:data] ||= {}
14
- options[:data] = options[:data].merge(attribute)
15
- super
10
+ FIELD_HELPERS.each do |method_name|
11
+ define_method(method_name) do |method, options = {}|
12
+ attribute = @attributes.validator_data(method)
13
+ options[:data] ||= {}
14
+ options[:data] = options[:data].merge(attribute)
15
+ super(method, options)
16
+ end
16
17
  end
17
18
  end
18
19
  end
@@ -1,3 +1,3 @@
1
1
  module BootstrapValidatorRails
2
- VERSION = "0.2.0"
2
+ VERSION = "0.3.0"
3
3
  end
@@ -4,7 +4,7 @@ class BootstrapValidatorRailsTest < ActionView::TestCase
4
4
  def setup
5
5
  @post = Post.new(title: 'An awesome title')
6
6
  @form = view.bootstrap_validation_form_for(@post, url: '#') do |f|
7
- f.text_field :title
7
+ f.number_field :title
8
8
  end
9
9
  end
10
10
 
@@ -1608,5 +1608,53 @@ BootstrapValidatorRailsTest: test_test_will_be_included_later
1608
1608
   (0.1ms) begin transaction
1609
1609
  -------------------------------------------------------------
1610
1610
  BootstrapValidatorRailsTest: test_test_will_be_included_later
1611
+ -------------------------------------------------------------
1612
+  (0.1ms) rollback transaction
1613
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1614
+  (0.1ms) begin transaction
1615
+ -------------------------------------------------------------
1616
+ BootstrapValidatorRailsTest: test_test_will_be_included_later
1617
+ -------------------------------------------------------------
1618
+  (0.1ms) rollback transaction
1619
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1620
+  (0.1ms) begin transaction
1621
+ -------------------------------------------------------------
1622
+ BootstrapValidatorRailsTest: test_test_will_be_included_later
1623
+ -------------------------------------------------------------
1624
+  (0.1ms) rollback transaction
1625
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1626
+  (0.1ms) begin transaction
1627
+ -------------------------------------------------------------
1628
+ BootstrapValidatorRailsTest: test_test_will_be_included_later
1629
+ -------------------------------------------------------------
1630
+  (0.1ms) rollback transaction
1631
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1632
+  (0.1ms) begin transaction
1633
+ -------------------------------------------------------------
1634
+ BootstrapValidatorRailsTest: test_test_will_be_included_later
1635
+ -------------------------------------------------------------
1636
+  (0.1ms) rollback transaction
1637
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
1638
+  (0.1ms) begin transaction
1639
+ -------------------------------------------------------------
1640
+ BootstrapValidatorRailsTest: test_test_will_be_included_later
1641
+ -------------------------------------------------------------
1642
+  (0.1ms) rollback transaction
1643
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1644
+  (0.1ms) begin transaction
1645
+ -------------------------------------------------------------
1646
+ BootstrapValidatorRailsTest: test_test_will_be_included_later
1647
+ -------------------------------------------------------------
1648
+  (0.1ms) rollback transaction
1649
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1650
+  (0.1ms) begin transaction
1651
+ -------------------------------------------------------------
1652
+ BootstrapValidatorRailsTest: test_test_will_be_included_later
1653
+ -------------------------------------------------------------
1654
+  (0.1ms) rollback transaction
1655
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1656
+  (0.1ms) begin transaction
1657
+ -------------------------------------------------------------
1658
+ BootstrapValidatorRailsTest: test_test_will_be_included_later
1611
1659
  -------------------------------------------------------------
1612
1660
   (0.1ms) rollback transaction
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bootstrap_validator_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - huynhquancam