gaku_nested_forms 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
data/README.md
ADDED
File without changes
|
@@ -0,0 +1,12 @@
|
|
1
|
+
require 'nested_form/builder_mixin'
|
2
|
+
require 'gaku_forms/form_builders/validate_form_builder'
|
3
|
+
|
4
|
+
module GakuNestedForms
|
5
|
+
module FormBuilders
|
6
|
+
|
7
|
+
class ValidateNestedFormBuilder < GakuForms::FormBuilders::ValidateFormBuilder
|
8
|
+
include ::NestedForm::BuilderMixin
|
9
|
+
end
|
10
|
+
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
module GakuNestedForms
|
2
|
+
module Helper
|
3
|
+
|
4
|
+
def remote_nested_form_for(object, options = {}, &block)
|
5
|
+
options[:validate] = true
|
6
|
+
options[:builder] = GakuNestedForms::FormBuilders::ValidateNestedFormBuilder
|
7
|
+
options[:html] = {:class => 'remote-form form'}
|
8
|
+
options[:remote] = true
|
9
|
+
content_tag :div, class: "row-fluid" do
|
10
|
+
content_tag :div, class: "span12 well" do
|
11
|
+
nested_form_for(object, options, &block)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
def modal_nested_form_for(object, options = {}, &block)
|
17
|
+
options[:validate] = true
|
18
|
+
options[:builder] = GakuNestedForms::FormBuilders::ValidateNestedFormBuilder
|
19
|
+
options[:html] = {:'data-type' => 'script', :class => 'remote-form'}
|
20
|
+
options[:remote] = true
|
21
|
+
nested_form_for(object, options, &block)
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
25
|
+
end
|
metadata
ADDED
@@ -0,0 +1,112 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: gaku_nested_forms
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 29
|
5
|
+
prerelease:
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 0
|
9
|
+
- 1
|
10
|
+
version: 0.0.1
|
11
|
+
platform: ruby
|
12
|
+
authors:
|
13
|
+
- Vassil Kalkov
|
14
|
+
autorequire:
|
15
|
+
bindir: bin
|
16
|
+
cert_chain: []
|
17
|
+
|
18
|
+
date: 2013-04-23 00:00:00 Z
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
21
|
+
name: gaku_forms
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
+
none: false
|
25
|
+
requirements:
|
26
|
+
- - ">="
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
hash: 3
|
29
|
+
segments:
|
30
|
+
- 0
|
31
|
+
version: "0"
|
32
|
+
type: :runtime
|
33
|
+
version_requirements: *id001
|
34
|
+
- !ruby/object:Gem::Dependency
|
35
|
+
name: nested_form
|
36
|
+
prerelease: false
|
37
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
38
|
+
none: false
|
39
|
+
requirements:
|
40
|
+
- - ">="
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
hash: 3
|
43
|
+
segments:
|
44
|
+
- 0
|
45
|
+
version: "0"
|
46
|
+
type: :runtime
|
47
|
+
version_requirements: *id002
|
48
|
+
- !ruby/object:Gem::Dependency
|
49
|
+
name: client_side_validations
|
50
|
+
prerelease: false
|
51
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
52
|
+
none: false
|
53
|
+
requirements:
|
54
|
+
- - ">="
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
hash: 3
|
57
|
+
segments:
|
58
|
+
- 0
|
59
|
+
version: "0"
|
60
|
+
type: :runtime
|
61
|
+
version_requirements: *id003
|
62
|
+
description: ""
|
63
|
+
email: vassilkalkov@gmail.com
|
64
|
+
executables: []
|
65
|
+
|
66
|
+
extensions: []
|
67
|
+
|
68
|
+
extra_rdoc_files: []
|
69
|
+
|
70
|
+
files:
|
71
|
+
- lib/gaku_nested_forms.rb
|
72
|
+
- lib/gaku_nested_forms/engine.rb
|
73
|
+
- lib/gaku_nested_forms/helper.rb
|
74
|
+
- lib/gaku_nested_forms/form_builders/validate_nested_form_builder.rb
|
75
|
+
- README.md
|
76
|
+
homepage: http://kalkov.github.io
|
77
|
+
licenses: []
|
78
|
+
|
79
|
+
post_install_message:
|
80
|
+
rdoc_options: []
|
81
|
+
|
82
|
+
require_paths:
|
83
|
+
- lib
|
84
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
85
|
+
none: false
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
hash: 57
|
90
|
+
segments:
|
91
|
+
- 1
|
92
|
+
- 8
|
93
|
+
- 7
|
94
|
+
version: 1.8.7
|
95
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
96
|
+
none: false
|
97
|
+
requirements:
|
98
|
+
- - ">="
|
99
|
+
- !ruby/object:Gem::Version
|
100
|
+
hash: 3
|
101
|
+
segments:
|
102
|
+
- 0
|
103
|
+
version: "0"
|
104
|
+
requirements:
|
105
|
+
- none
|
106
|
+
rubyforge_project:
|
107
|
+
rubygems_version: 1.8.15
|
108
|
+
signing_key:
|
109
|
+
specification_version: 3
|
110
|
+
summary: Gaku Nested Forms
|
111
|
+
test_files: []
|
112
|
+
|