form_angular 0.0.2 → 0.0.3

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: 10b085e08a657283eb0d7ed56cf681518c107f46
4
- data.tar.gz: abf225ebac05be230089f0e62d0f1c16c574de7d
3
+ metadata.gz: 6cd018a194377ba8ca92de6d924c2d71dae809d2
4
+ data.tar.gz: 03bd06c67288d0728b77102a65462a768c04d95a
5
5
  SHA512:
6
- metadata.gz: 98d8ff8da7a044967fa3d8e44b2dd799194706949f07e61acfe53647973e4a36ed82c9fcea69950af655f283ca0f43d5d39755ef47b62d33d2a527c4292ac37c
7
- data.tar.gz: df6a7d672c467b9c0beb8246c89b5023e6401821d417466d92cf3f40c0b80f5adf047f72622cd309160d25c881030b202e947e3f193b79f3bd10befda9ff1a59
6
+ metadata.gz: b9984f0dee59c16e2b49c767208a538cbc37af4fd524318b179ec621b5ccbfa8cf0c145c551cd2092b907e27e032266ac3f4c53ffb404c342fdef8ac15da4f36
7
+ data.tar.gz: 4f7e9fddcd7b9ec248b26b28ae1ca4eebf8e14d1e7d5eacec356f740c713ef53de56a80137eee1963f0f645cc01080bb3af3e753f6ad0b29a22da4813a93cc86
@@ -14,8 +14,10 @@ module FormAngular
14
14
 
15
15
  def build_angular_options(attribute_name, builder)
16
16
  begin
17
+ names = builder.object_name.sub("[", ".").sub("]", "").sub("_attributes", "").split(".")
18
+ names[0] = names[0].camelize(:lower)
17
19
  angular_options = {
18
- 'ng-model' => "#{builder.object_name.sub("[", ".").sub("]", "").sub("_attributes", "")}.#{attribute_name}",
20
+ 'ng-model' => "#{names.join(".")}.#{attribute_name}",
19
21
  'server-error' => "true"
20
22
  }
21
23
  rescue => e
@@ -1,3 +1,3 @@
1
1
  module FormAngular
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: form_angular
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Guillaume Balaine
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-07-03 00:00:00.000000000 Z
12
+ date: 2014-07-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler