simple_nested_form 0.0.4 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -2,3 +2,4 @@
2
2
  .bundle
3
3
  pkg/*
4
4
  vendor/*
5
+ Gemfile.lock
@@ -56,7 +56,7 @@ module SimpleNestedForm
56
56
  super(record_or_name_or_array, *(args << options), &block)
57
57
  end
58
58
 
59
- def fields_for_with_nested_attributes(association, args, block)
59
+ def fields_for_with_nested_attributes(association, *args, block)
60
60
  nested_fields[association] = block
61
61
  super
62
62
  end
@@ -1,3 +1,3 @@
1
1
  module SimpleNestedForm
2
- VERSION = "0.0.4"
2
+ VERSION = "1.0.0"
3
3
  end
@@ -9,7 +9,7 @@ Gem::Specification.new do |s|
9
9
  s.authors = ["Rodrigo Navarro", "Ryan Bates"]
10
10
  s.email = ["rnavarro1@gmail.com"]
11
11
  s.homepage = "https://github.com/reu/simple_nested_form"
12
- s.summary = "Adds support for easily creeate nested forms with simple_form"
12
+ s.summary = "Adds support for easily creeate nested forms with simple_form"
13
13
  s.description = "Adds support for easily creeate nested forms with simple_form"
14
14
 
15
15
  s.rubyforge_project = "simple_nested_form"
@@ -19,9 +19,10 @@ Gem::Specification.new do |s|
19
19
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
20
20
  s.require_paths = ["lib"]
21
21
 
22
- s.add_dependency "simple_form", "~> 1.3.1"
22
+ s.add_dependency "simple_form", "~> 1.5.2"
23
23
 
24
24
  s.add_development_dependency "rspec", "~> 2.5.0"
25
25
  s.add_development_dependency "nokogiri", "~> 1.4.4"
26
- s.add_development_dependency "rails", "~> 3.0.5"
26
+ s.add_development_dependency "rails", "~> 3.2.0"
27
+ s.add_development_dependency "sqlite3"
27
28
  end
@@ -8,32 +8,24 @@ require 'nokogiri'
8
8
  require 'simple_form'
9
9
  require 'simple_nested_form'
10
10
 
11
- class TablelessModel < ActiveRecord::Base
12
- def self.columns
13
- @columns ||= []
14
- end
15
-
16
- def self.column(name, sql_type = nil, default = nil, null = true)
17
- columns << ActiveRecord::ConnectionAdapters::Column.new(name.to_s, default, sql_type.to_s, null)
18
- end
19
-
20
- def self.quoted_table_name
21
- name.pluralize.underscore
11
+ ActiveRecord::Base.establish_connection(:adapter => "sqlite3", :database => ":memory:")
12
+
13
+ ActiveRecord::Schema.define do
14
+ create_table :projects, :force => true do |t|
15
+ t.string :name
22
16
  end
23
-
24
- def quoted_id
25
- "0"
17
+
18
+ create_table :tasks, :force => true do |t|
19
+ t.references :project
20
+ t.string :name
26
21
  end
27
22
  end
28
23
 
29
- class Project < TablelessModel
30
- column :name, :string
24
+ class Project < ActiveRecord::Base
31
25
  has_many :tasks
32
26
  accepts_nested_attributes_for :tasks
33
27
  end
34
28
 
35
- class Task < TablelessModel
36
- column :project_id, :integer
37
- column :name, :string
29
+ class Task < ActiveRecord::Base
38
30
  belongs_to :project
39
31
  end
metadata CHANGED
@@ -1,101 +1,81 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: simple_nested_form
3
- version: !ruby/object:Gem::Version
4
- hash: 23
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
5
  prerelease:
6
- segments:
7
- - 0
8
- - 0
9
- - 4
10
- version: 0.0.4
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Rodrigo Navarro
14
9
  - Ryan Bates
15
10
  autorequire:
16
11
  bindir: bin
17
12
  cert_chain: []
18
-
19
- date: 2011-03-09 00:00:00 -03:00
20
- default_executable:
21
- dependencies:
22
- - !ruby/object:Gem::Dependency
13
+ date: 2012-01-26 00:00:00.000000000Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
23
16
  name: simple_form
24
- prerelease: false
25
- requirement: &id001 !ruby/object:Gem::Requirement
17
+ requirement: &2153459080 !ruby/object:Gem::Requirement
26
18
  none: false
27
- requirements:
19
+ requirements:
28
20
  - - ~>
29
- - !ruby/object:Gem::Version
30
- hash: 25
31
- segments:
32
- - 1
33
- - 3
34
- - 1
35
- version: 1.3.1
21
+ - !ruby/object:Gem::Version
22
+ version: 1.5.2
36
23
  type: :runtime
37
- version_requirements: *id001
38
- - !ruby/object:Gem::Dependency
39
- name: rspec
40
24
  prerelease: false
41
- requirement: &id002 !ruby/object:Gem::Requirement
25
+ version_requirements: *2153459080
26
+ - !ruby/object:Gem::Dependency
27
+ name: rspec
28
+ requirement: &2153456920 !ruby/object:Gem::Requirement
42
29
  none: false
43
- requirements:
30
+ requirements:
44
31
  - - ~>
45
- - !ruby/object:Gem::Version
46
- hash: 27
47
- segments:
48
- - 2
49
- - 5
50
- - 0
32
+ - !ruby/object:Gem::Version
51
33
  version: 2.5.0
52
34
  type: :development
53
- version_requirements: *id002
54
- - !ruby/object:Gem::Dependency
55
- name: nokogiri
56
35
  prerelease: false
57
- requirement: &id003 !ruby/object:Gem::Requirement
36
+ version_requirements: *2153456920
37
+ - !ruby/object:Gem::Dependency
38
+ name: nokogiri
39
+ requirement: &2153455600 !ruby/object:Gem::Requirement
58
40
  none: false
59
- requirements:
41
+ requirements:
60
42
  - - ~>
61
- - !ruby/object:Gem::Version
62
- hash: 15
63
- segments:
64
- - 1
65
- - 4
66
- - 4
43
+ - !ruby/object:Gem::Version
67
44
  version: 1.4.4
68
45
  type: :development
69
- version_requirements: *id003
70
- - !ruby/object:Gem::Dependency
71
- name: rails
72
46
  prerelease: false
73
- requirement: &id004 !ruby/object:Gem::Requirement
47
+ version_requirements: *2153455600
48
+ - !ruby/object:Gem::Dependency
49
+ name: rails
50
+ requirement: &2153454200 !ruby/object:Gem::Requirement
74
51
  none: false
75
- requirements:
52
+ requirements:
76
53
  - - ~>
77
- - !ruby/object:Gem::Version
78
- hash: 13
79
- segments:
80
- - 3
81
- - 0
82
- - 5
83
- version: 3.0.5
54
+ - !ruby/object:Gem::Version
55
+ version: 3.2.0
84
56
  type: :development
85
- version_requirements: *id004
57
+ prerelease: false
58
+ version_requirements: *2153454200
59
+ - !ruby/object:Gem::Dependency
60
+ name: sqlite3
61
+ requirement: &2153453260 !ruby/object:Gem::Requirement
62
+ none: false
63
+ requirements:
64
+ - - ! '>='
65
+ - !ruby/object:Gem::Version
66
+ version: '0'
67
+ type: :development
68
+ prerelease: false
69
+ version_requirements: *2153453260
86
70
  description: Adds support for easily creeate nested forms with simple_form
87
- email:
71
+ email:
88
72
  - rnavarro1@gmail.com
89
73
  executables: []
90
-
91
74
  extensions: []
92
-
93
75
  extra_rdoc_files: []
94
-
95
- files:
76
+ files:
96
77
  - .gitignore
97
78
  - Gemfile
98
- - Gemfile.lock
99
79
  - Rakefile
100
80
  - lib/generators/simple_nested_form/install_generator.rb
101
81
  - lib/generators/simple_nested_form/templates/simple_nested_form.js
@@ -107,41 +87,37 @@ files:
107
87
  - spec/simple_nested_form/builder_spec.rb
108
88
  - spec/simple_nested_form/view_helper_spec.rb
109
89
  - spec/spec_helper.rb
110
- has_rdoc: true
111
90
  homepage: https://github.com/reu/simple_nested_form
112
91
  licenses: []
113
-
114
92
  post_install_message:
115
93
  rdoc_options: []
116
-
117
- require_paths:
94
+ require_paths:
118
95
  - lib
119
- required_ruby_version: !ruby/object:Gem::Requirement
96
+ required_ruby_version: !ruby/object:Gem::Requirement
120
97
  none: false
121
- requirements:
122
- - - ">="
123
- - !ruby/object:Gem::Version
124
- hash: 3
125
- segments:
98
+ requirements:
99
+ - - ! '>='
100
+ - !ruby/object:Gem::Version
101
+ version: '0'
102
+ segments:
126
103
  - 0
127
- version: "0"
128
- required_rubygems_version: !ruby/object:Gem::Requirement
104
+ hash: -2140310637856216896
105
+ required_rubygems_version: !ruby/object:Gem::Requirement
129
106
  none: false
130
- requirements:
131
- - - ">="
132
- - !ruby/object:Gem::Version
133
- hash: 3
134
- segments:
107
+ requirements:
108
+ - - ! '>='
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ segments:
135
112
  - 0
136
- version: "0"
113
+ hash: -2140310637856216896
137
114
  requirements: []
138
-
139
115
  rubyforge_project: simple_nested_form
140
- rubygems_version: 1.5.0
116
+ rubygems_version: 1.8.10
141
117
  signing_key:
142
118
  specification_version: 3
143
119
  summary: Adds support for easily creeate nested forms with simple_form
144
- test_files:
120
+ test_files:
145
121
  - spec/simple_nested_form/builder_spec.rb
146
122
  - spec/simple_nested_form/view_helper_spec.rb
147
123
  - spec/spec_helper.rb
@@ -1,91 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- simple_nested_form (0.0.4)
5
- simple_form (~> 1.3.1)
6
-
7
- GEM
8
- remote: http://rubygems.org/
9
- specs:
10
- abstract (1.0.0)
11
- actionmailer (3.0.5)
12
- actionpack (= 3.0.5)
13
- mail (~> 2.2.15)
14
- actionpack (3.0.5)
15
- activemodel (= 3.0.5)
16
- activesupport (= 3.0.5)
17
- builder (~> 2.1.2)
18
- erubis (~> 2.6.6)
19
- i18n (~> 0.4)
20
- rack (~> 1.2.1)
21
- rack-mount (~> 0.6.13)
22
- rack-test (~> 0.5.7)
23
- tzinfo (~> 0.3.23)
24
- activemodel (3.0.5)
25
- activesupport (= 3.0.5)
26
- builder (~> 2.1.2)
27
- i18n (~> 0.4)
28
- activerecord (3.0.5)
29
- activemodel (= 3.0.5)
30
- activesupport (= 3.0.5)
31
- arel (~> 2.0.2)
32
- tzinfo (~> 0.3.23)
33
- activeresource (3.0.5)
34
- activemodel (= 3.0.5)
35
- activesupport (= 3.0.5)
36
- activesupport (3.0.5)
37
- arel (2.0.9)
38
- builder (2.1.2)
39
- diff-lcs (1.1.2)
40
- erubis (2.6.6)
41
- abstract (>= 1.0.0)
42
- i18n (0.5.0)
43
- mail (2.2.15)
44
- activesupport (>= 2.3.6)
45
- i18n (>= 0.4.0)
46
- mime-types (~> 1.16)
47
- treetop (~> 1.4.8)
48
- mime-types (1.16)
49
- nokogiri (1.4.4)
50
- polyglot (0.3.1)
51
- rack (1.2.1)
52
- rack-mount (0.6.13)
53
- rack (>= 1.0.0)
54
- rack-test (0.5.7)
55
- rack (>= 1.0)
56
- rails (3.0.5)
57
- actionmailer (= 3.0.5)
58
- actionpack (= 3.0.5)
59
- activerecord (= 3.0.5)
60
- activeresource (= 3.0.5)
61
- activesupport (= 3.0.5)
62
- bundler (~> 1.0)
63
- railties (= 3.0.5)
64
- railties (3.0.5)
65
- actionpack (= 3.0.5)
66
- activesupport (= 3.0.5)
67
- rake (>= 0.8.7)
68
- thor (~> 0.14.4)
69
- rake (0.8.7)
70
- rspec (2.5.0)
71
- rspec-core (~> 2.5.0)
72
- rspec-expectations (~> 2.5.0)
73
- rspec-mocks (~> 2.5.0)
74
- rspec-core (2.5.1)
75
- rspec-expectations (2.5.0)
76
- diff-lcs (~> 1.1.2)
77
- rspec-mocks (2.5.0)
78
- simple_form (1.3.1)
79
- thor (0.14.6)
80
- treetop (1.4.9)
81
- polyglot (>= 0.3.1)
82
- tzinfo (0.3.24)
83
-
84
- PLATFORMS
85
- ruby
86
-
87
- DEPENDENCIES
88
- nokogiri (~> 1.4.4)
89
- rails (~> 3.0.5)
90
- rspec (~> 2.5.0)
91
- simple_nested_form!