form_angular 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -0
- data/lib/form_angular/helpers/ng_option_utils.rb +1 -1
- data/lib/form_angular/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 44d80e1d16aa462bfa1e134c289a4d128bb7d0f1
|
4
|
+
data.tar.gz: de7eb4b51a6e6c5d13280247d44cf4c0ba7adad3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 70b56f0b67d050ca15457fd0d1dc471c04e84781515b7ff13803e340d4869e97b8ce65d9c4649a6bb45632748d2c89ceebbb05400b74272b1b17582871b53376
|
7
|
+
data.tar.gz: eaec11be6e673d9f0a323cbc14f82b534f0493c8568a19f5f3d2aaf1d541bb94d8b4909d02111cc509ada814811a287327fd9f202c62533d88b41fe5c146a8fc
|
data/README.md
CHANGED
@@ -3,6 +3,14 @@ form_angular
|
|
3
3
|
|
4
4
|
Rails gem for forms using Angular
|
5
5
|
|
6
|
+
Add these gems to your Gemfile
|
7
|
+
|
8
|
+
`gem 'simple_form'`
|
9
|
+
`gem 'form_angular'`
|
10
|
+
|
11
|
+
If you are not already including AngularJS then :
|
12
|
+
`gem 'angular-rails'`
|
13
|
+
|
6
14
|
Currently uses simple forms, might grow out of it and stay compatible for performance purposes.
|
7
15
|
|
8
16
|
# Enabling an angular form
|
@@ -14,7 +14,7 @@ module FormAngular
|
|
14
14
|
|
15
15
|
def build_angular_options(attribute_name, builder)
|
16
16
|
begin
|
17
|
-
names = builder.object_name.
|
17
|
+
names = builder.object_name.gsub("[", ".").gsub("]", "").gsub("_attributes", "").split(".")
|
18
18
|
names[0] = names[0].camelize(:lower)
|
19
19
|
angular_options = {
|
20
20
|
'ng-model' => "#{names.join(".")}.#{attribute_name}",
|
data/lib/form_angular/version.rb
CHANGED
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.
|
4
|
+
version: 0.0.4
|
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-
|
12
|
+
date: 2014-08-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|