easy_form 0.0.3 → 0.0.5

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
- SHA1:
3
- metadata.gz: 02cba32ef48ed1cc6db1ef51a876e6459155a2f5
4
- data.tar.gz: 079e69b5b4c9f5e11b510d7bc76d8bbe60dfe1cf
2
+ SHA256:
3
+ metadata.gz: e60da3225e321d2c4dc684fc1af8aad329ae6a5d4edbf94e5e74b95a06fb12b8
4
+ data.tar.gz: 605751db4424e1b6eef86e475cf272c894965fd1b8f08ceabfa6f60780c8dfb5
5
5
  SHA512:
6
- metadata.gz: 38c5036a790bac5d9d23f77f620dca1f8a900cc3822e62e27c45665f32dc31c2e15913ac7fd321739e23a613dfd63bd5b449b20e3d664d11533cfedead19da3e
7
- data.tar.gz: 724a28a852eb858323f87f560f3f77e2a3deb9b2314d187135af0f2e556a6b4b29f11359ec6f3173a1401f364e3c9029113ac5e67f1c0e787a6c071c5022c264
6
+ metadata.gz: 67b4f756458449d28723406d22542c9d5acf9c1e17bec3b0b5e738c0348c8ec1907d5d6e8008e84602de56f0951d7060714f78dfc2e892998e293e0c1c54c7c1
7
+ data.tar.gz: f878bf285b8c9d90e95604f9f5b137fc83e2310a3fb812cb38bac38760700689b7105fe0bf5616fbc835274843e4409104a5453d992f9fc7c76a8076a14160eb
@@ -17,7 +17,7 @@ module EasyForm
17
17
  end
18
18
 
19
19
  def input(options={})
20
- builder.send(*args, @options.merge(options), &@block)
20
+ builder.send(*args, self.class.class_merge(@options, options), &@block)
21
21
  end
22
22
 
23
23
  def required?
@@ -35,5 +35,12 @@ module EasyForm
35
35
  def template_name
36
36
  builder.options[:template] || options[:template] || :default
37
37
  end
38
+
39
+ def self.class_merge(h1, h2)
40
+ if h2[:class]
41
+ h2[:class] = "#{h2[:class]} #{h1[:class]}"
42
+ end
43
+ h1.merge(h2)
44
+ end
38
45
  end
39
46
  end
@@ -1,3 +1,3 @@
1
1
  module EasyForm
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.5"
3
3
  end
metadata CHANGED
@@ -1,11 +1,11 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: easy_form
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - kikyous
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
  date: 2015-05-26 00:00:00.000000000 Z
@@ -30,7 +30,7 @@ homepage: https://github.com/kikyous/easy_form
30
30
  licenses:
31
31
  - MIT
32
32
  metadata: {}
33
- post_install_message:
33
+ post_install_message:
34
34
  rdoc_options: []
35
35
  require_paths:
36
36
  - lib
@@ -45,9 +45,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
45
45
  - !ruby/object:Gem::Version
46
46
  version: '0'
47
47
  requirements: []
48
- rubyforge_project:
49
- rubygems_version: 2.5.1
50
- signing_key:
48
+ rubygems_version: 3.2.22
49
+ signing_key:
51
50
  specification_version: 4
52
51
  summary: form builder without complex dsl
53
52
  test_files: []