inherited_resources 1.3.0 → 1.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +6 -0
- data/Gemfile +4 -10
- data/Gemfile.lock +67 -71
- data/README.rdoc +26 -18
- data/Rakefile +2 -2
- data/inherited_resources.gemspec +2 -3
- data/lib/inherited_resources/class_methods.rb +1 -0
- data/lib/inherited_resources/polymorphic_helpers.rb +10 -3
- data/lib/inherited_resources/version.rb +1 -1
- data/test/class_methods_test.rb +1 -1
- data/test/nested_model_with_shallow_test.rb +4 -4
- data/test/polymorphic_test.rb +29 -0
- data/test/url_helpers_test.rb +2 -3
- data/test/views/photos/index.html.erb +1 -0
- metadata +44 -64
data/CHANGELOG
CHANGED
data/Gemfile
CHANGED
@@ -1,12 +1,6 @@
|
|
1
|
-
source
|
1
|
+
source :rubygems
|
2
2
|
|
3
|
-
|
4
|
-
gem "responders", "~> 0.6.0"
|
5
|
-
gem "has_scope", "~> 0.5.0"
|
6
|
-
gem "mocha"
|
3
|
+
gemspec
|
7
4
|
|
8
|
-
|
9
|
-
|
10
|
-
else
|
11
|
-
gem "test-unit"
|
12
|
-
end
|
5
|
+
gem 'rails', '~> 3.1'
|
6
|
+
gem 'mocha'
|
data/Gemfile.lock
CHANGED
@@ -1,104 +1,100 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
inherited_resources (1.3.1)
|
5
|
+
has_scope (~> 0.5.0)
|
6
|
+
responders (~> 0.6)
|
7
|
+
|
1
8
|
GEM
|
2
9
|
remote: http://rubygems.org/
|
3
10
|
specs:
|
4
|
-
actionmailer (3.
|
5
|
-
actionpack (= 3.
|
6
|
-
mail (~> 2.
|
7
|
-
actionpack (3.
|
8
|
-
activemodel (= 3.
|
9
|
-
activesupport (= 3.
|
11
|
+
actionmailer (3.2.2)
|
12
|
+
actionpack (= 3.2.2)
|
13
|
+
mail (~> 2.4.0)
|
14
|
+
actionpack (3.2.2)
|
15
|
+
activemodel (= 3.2.2)
|
16
|
+
activesupport (= 3.2.2)
|
10
17
|
builder (~> 3.0.0)
|
11
18
|
erubis (~> 2.7.0)
|
12
|
-
|
13
|
-
rack (~> 1.
|
14
|
-
rack-cache (~> 1.
|
15
|
-
rack-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
activemodel (3.1.0.rc4)
|
20
|
-
activesupport (= 3.1.0.rc4)
|
21
|
-
bcrypt-ruby (~> 2.1.4)
|
19
|
+
journey (~> 1.0.1)
|
20
|
+
rack (~> 1.4.0)
|
21
|
+
rack-cache (~> 1.1)
|
22
|
+
rack-test (~> 0.6.1)
|
23
|
+
sprockets (~> 2.1.2)
|
24
|
+
activemodel (3.2.2)
|
25
|
+
activesupport (= 3.2.2)
|
22
26
|
builder (~> 3.0.0)
|
27
|
+
activerecord (3.2.2)
|
28
|
+
activemodel (= 3.2.2)
|
29
|
+
activesupport (= 3.2.2)
|
30
|
+
arel (~> 3.0.2)
|
31
|
+
tzinfo (~> 0.3.29)
|
32
|
+
activeresource (3.2.2)
|
33
|
+
activemodel (= 3.2.2)
|
34
|
+
activesupport (= 3.2.2)
|
35
|
+
activesupport (3.2.2)
|
23
36
|
i18n (~> 0.6)
|
24
|
-
activerecord (3.1.0.rc4)
|
25
|
-
activemodel (= 3.1.0.rc4)
|
26
|
-
activesupport (= 3.1.0.rc4)
|
27
|
-
arel (~> 2.1.1)
|
28
|
-
tzinfo (~> 0.3.27)
|
29
|
-
activeresource (3.1.0.rc4)
|
30
|
-
activemodel (= 3.1.0.rc4)
|
31
|
-
activesupport (= 3.1.0.rc4)
|
32
|
-
activesupport (3.1.0.rc4)
|
33
37
|
multi_json (~> 1.0)
|
34
|
-
arel (
|
35
|
-
bcrypt-ruby (2.1.4)
|
38
|
+
arel (3.0.2)
|
36
39
|
builder (3.0.0)
|
37
|
-
columnize (0.3.4)
|
38
40
|
erubis (2.7.0)
|
39
|
-
has_scope (0.5.
|
40
|
-
hike (1.1
|
41
|
+
has_scope (0.5.1)
|
42
|
+
hike (1.2.1)
|
41
43
|
i18n (0.6.0)
|
42
|
-
|
43
|
-
|
44
|
-
mail (2.3
|
44
|
+
journey (1.0.3)
|
45
|
+
json (1.6.5)
|
46
|
+
mail (2.4.3)
|
45
47
|
i18n (>= 0.4.0)
|
46
48
|
mime-types (~> 1.16)
|
47
49
|
treetop (~> 1.4.8)
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
rack
|
50
|
+
metaclass (0.0.1)
|
51
|
+
mime-types (1.17.2)
|
52
|
+
mocha (0.10.0)
|
53
|
+
metaclass (~> 0.0.1)
|
54
|
+
multi_json (1.1.0)
|
55
|
+
polyglot (0.3.3)
|
56
|
+
rack (1.4.1)
|
57
|
+
rack-cache (1.2)
|
55
58
|
rack (>= 0.4)
|
56
|
-
rack-mount (0.8.1)
|
57
|
-
rack (>= 1.0.0)
|
58
59
|
rack-ssl (1.3.2)
|
59
60
|
rack
|
60
|
-
rack-test (0.6.
|
61
|
+
rack-test (0.6.1)
|
61
62
|
rack (>= 1.0)
|
62
|
-
rails (3.
|
63
|
-
actionmailer (= 3.
|
64
|
-
actionpack (= 3.
|
65
|
-
activerecord (= 3.
|
66
|
-
activeresource (= 3.
|
67
|
-
activesupport (= 3.
|
63
|
+
rails (3.2.2)
|
64
|
+
actionmailer (= 3.2.2)
|
65
|
+
actionpack (= 3.2.2)
|
66
|
+
activerecord (= 3.2.2)
|
67
|
+
activeresource (= 3.2.2)
|
68
|
+
activesupport (= 3.2.2)
|
68
69
|
bundler (~> 1.0)
|
69
|
-
railties (= 3.
|
70
|
-
railties (3.
|
71
|
-
actionpack (= 3.
|
72
|
-
activesupport (= 3.
|
70
|
+
railties (= 3.2.2)
|
71
|
+
railties (3.2.2)
|
72
|
+
actionpack (= 3.2.2)
|
73
|
+
activesupport (= 3.2.2)
|
73
74
|
rack-ssl (~> 1.3.2)
|
74
75
|
rake (>= 0.8.7)
|
75
76
|
rdoc (~> 3.4)
|
76
77
|
thor (~> 0.14.6)
|
77
|
-
rake (0.
|
78
|
-
|
79
|
-
|
80
|
-
responders (0.
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
ruby-debug-base (0.10.4)
|
85
|
-
linecache (>= 0.3)
|
86
|
-
sprockets (2.0.0.beta.10)
|
87
|
-
hike (~> 1.0)
|
78
|
+
rake (0.9.2.2)
|
79
|
+
rdoc (3.12)
|
80
|
+
json (~> 1.4)
|
81
|
+
responders (0.8.0)
|
82
|
+
railties (~> 3.1)
|
83
|
+
sprockets (2.1.2)
|
84
|
+
hike (~> 1.2)
|
88
85
|
rack (~> 1.0)
|
89
86
|
tilt (~> 1.1, != 1.3.0)
|
90
87
|
thor (0.14.6)
|
91
|
-
tilt (1.3.
|
92
|
-
treetop (1.4.
|
88
|
+
tilt (1.3.3)
|
89
|
+
treetop (1.4.10)
|
90
|
+
polyglot
|
93
91
|
polyglot (>= 0.3.1)
|
94
|
-
tzinfo (0.3.
|
92
|
+
tzinfo (0.3.32)
|
95
93
|
|
96
94
|
PLATFORMS
|
97
95
|
ruby
|
98
96
|
|
99
97
|
DEPENDENCIES
|
100
|
-
|
98
|
+
inherited_resources!
|
101
99
|
mocha
|
102
|
-
rails (
|
103
|
-
responders (~> 0.6.0)
|
104
|
-
ruby-debug
|
100
|
+
rails (~> 3.1)
|
data/README.rdoc
CHANGED
@@ -1,10 +1,18 @@
|
|
1
|
+
=== Deprecation notice
|
2
|
+
|
3
|
+
Since Rails 3 came out, I have no longer used Inherited Resources. I have found that the
|
4
|
+
responders abstraction and custom Rails generators offer the perfect balance between
|
5
|
+
hiding and showing too much logic. That said, I suggest developers to make use of the
|
6
|
+
responders gem (at https://github.com/plataformatec/responders) and no longer use Inherited
|
7
|
+
Resources.
|
8
|
+
|
1
9
|
== Inherited Resources
|
2
10
|
|
3
11
|
Inherited Resources speeds up development by making your controllers inherit
|
4
12
|
all restful actions so you just have to focus on what is important. It makes
|
5
13
|
your controllers more powerful and cleaner at the same time.
|
6
14
|
|
7
|
-
|
15
|
+
In addition to making your controllers follow a pattern, it helps you to write better
|
8
16
|
code by following fat models and skinny controllers convention. There are
|
9
17
|
two screencasts available besides this README:
|
10
18
|
|
@@ -23,7 +31,7 @@ And then execute:
|
|
23
31
|
|
24
32
|
bundle install
|
25
33
|
|
26
|
-
Or install it yourself
|
34
|
+
Or install it yourself with:
|
27
35
|
|
28
36
|
gem install inherited_resources
|
29
37
|
|
@@ -57,7 +65,7 @@ how it will change your application:
|
|
57
65
|
|
58
66
|
http://github.com/plataformatec/responders
|
59
67
|
|
60
|
-
And it can be installed
|
68
|
+
And it can be installed with:
|
61
69
|
|
62
70
|
gem install responders
|
63
71
|
|
@@ -85,7 +93,7 @@ The next step is to define which mime types this controller provides:
|
|
85
93
|
respond_to :html, :xml, :json
|
86
94
|
end
|
87
95
|
|
88
|
-
You can also specify them
|
96
|
+
You can also specify them per action:
|
89
97
|
|
90
98
|
class ProjectsController < InheritedResources::Base
|
91
99
|
respond_to :html, :xml, :json
|
@@ -93,7 +101,7 @@ You can also specify them based per action:
|
|
93
101
|
respond_to :iphone, :except => [ :edit, :update ]
|
94
102
|
end
|
95
103
|
|
96
|
-
For each request, it first
|
104
|
+
For each request, it first checks if the "controller/action.format" file is
|
97
105
|
available (for example "projects/create.xml") and if it's not, it checks if
|
98
106
|
the resource respond to :to_format (in this case, :to_xml). Otherwise returns 404.
|
99
107
|
|
@@ -129,8 +137,8 @@ call inherit_resources in your controller class scope:
|
|
129
137
|
== Overwriting defaults
|
130
138
|
|
131
139
|
Whenever you inherit from InheritedResources, several defaults are assumed.
|
132
|
-
For example you can have an AccountsController
|
133
|
-
resource is
|
140
|
+
For example you can have an AccountsController for account management while the
|
141
|
+
resource is a User:
|
134
142
|
|
135
143
|
class AccountsController < InheritedResources::Base
|
136
144
|
defaults :resource_class => User, :collection_name => 'users', :instance_name => 'user'
|
@@ -141,7 +149,7 @@ the routes used will still be accounts_url and account_url. If you plan also to
|
|
141
149
|
change the routes, you can use :route_collection_name and :route_instance_name.
|
142
150
|
|
143
151
|
Namespaced controllers work out of the box, but if you need to specify a
|
144
|
-
different route prefix
|
152
|
+
different route prefix you can do the following:
|
145
153
|
|
146
154
|
class Administrators::PeopleController < InheritedResources::Base
|
147
155
|
defaults :route_prefix => 'admin'
|
@@ -167,10 +175,10 @@ and scopes (more about this below).
|
|
167
175
|
|
168
176
|
InheritedResources also introduces another method called begin_of_association_chain.
|
169
177
|
It's mostly used when you want to create resources based on the @current_user and
|
170
|
-
you have urls like "account/projects". In such cases
|
178
|
+
you have urls like "account/projects". In such cases you have to do
|
171
179
|
@current_user.projects.find or @current_user.projects.build in your actions.
|
172
180
|
|
173
|
-
You can deal with it just doing:
|
181
|
+
You can deal with it just by doing:
|
174
182
|
|
175
183
|
class ProjectsController < InheritedResources::Base
|
176
184
|
protected
|
@@ -204,8 +212,8 @@ why all methods have aliases. So this is equivalent:
|
|
204
212
|
end
|
205
213
|
end
|
206
214
|
|
207
|
-
|
208
|
-
action
|
215
|
+
Since most of the time when you change a create, update or destroy
|
216
|
+
action you do so because you want to to change its redirect url, a shortcut is
|
209
217
|
provided. So you can do:
|
210
218
|
|
211
219
|
class ProjectsController < InheritedResources::Base
|
@@ -243,7 +251,7 @@ but you don't want to create a before filter for it:
|
|
243
251
|
end
|
244
252
|
end
|
245
253
|
|
246
|
-
Yes, that simple! The nice part is since you already set the instance variable
|
254
|
+
Yes, it's that simple! The nice part is since you already set the instance variable
|
247
255
|
@project, it will not build a project again.
|
248
256
|
|
249
257
|
Before we finish this topic, we should talk about one more thing: "success/failure
|
@@ -262,7 +270,7 @@ Our first attempt to do this would be:
|
|
262
270
|
end
|
263
271
|
end
|
264
272
|
|
265
|
-
Looks
|
273
|
+
Looks too verbose, right? We can actually do:
|
266
274
|
|
267
275
|
class ProjectsController < InheritedResources::Base
|
268
276
|
def update
|
@@ -273,7 +281,7 @@ Looks to verbose, right? We can actually do:
|
|
273
281
|
end
|
274
282
|
|
275
283
|
Much better! So explaining everything: when you give a block which expects one
|
276
|
-
argument it will be executed in both scenarios: success and failure. But
|
284
|
+
argument it will be executed in both scenarios: success and failure. But if you
|
277
285
|
give a block that expects two arguments, the first will be executed only in
|
278
286
|
success scenarios and the second in failure scenarios. You keep everything
|
279
287
|
clean and organized inside the same action.
|
@@ -284,8 +292,8 @@ Although the syntax above is a nice shortcut, you won't need to do it frequently
|
|
284
292
|
because (since version 1.2) Inherited Resources has smart redirects. Redirects
|
285
293
|
in actions calculates depending on the existent controller methods.
|
286
294
|
|
287
|
-
Redirects in create and update actions calculates in following order resource_url,
|
288
|
-
collection_url, parent_url (which we are going to see later), root_url. Redirect
|
295
|
+
Redirects in create and update actions calculates in the following order resource_url,
|
296
|
+
collection_url, parent_url (which we are going to see later), and root_url. Redirect
|
289
297
|
in destroy action calculate in following order collection_url, parent_url, root_url.
|
290
298
|
|
291
299
|
Example:
|
@@ -506,7 +514,7 @@ search_resources_{path,url} url helpers.
|
|
506
514
|
|
507
515
|
== What about views?
|
508
516
|
|
509
|
-
Sometimes just
|
517
|
+
Sometimes just DRYing up the controllers is not enough. If you need to DRY up your views,
|
510
518
|
check this Wiki page:
|
511
519
|
|
512
520
|
https://github.com/josevalim/inherited_resources/wiki/Views-Inheritance
|
data/Rakefile
CHANGED
data/inherited_resources.gemspec
CHANGED
@@ -16,9 +16,8 @@ Gem::Specification.new do |s|
|
|
16
16
|
|
17
17
|
s.files = `git ls-files`.split("\n")
|
18
18
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
19
|
-
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
20
19
|
s.require_paths = ["lib"]
|
21
20
|
|
22
|
-
s.add_dependency("responders", "~> 0.6
|
21
|
+
s.add_dependency("responders", "~> 0.6")
|
23
22
|
s.add_dependency("has_scope", "~> 0.5.0")
|
24
|
-
end
|
23
|
+
end
|
@@ -181,6 +181,7 @@ module InheritedResources
|
|
181
181
|
nil
|
182
182
|
end
|
183
183
|
|
184
|
+
|
184
185
|
config[:collection_name] = options.delete(:collection_name) || symbol.to_s.pluralize.to_sym
|
185
186
|
config[:instance_name] = options.delete(:instance_name) || symbol
|
186
187
|
config[:param] = options.delete(:param) || :"#{symbol}_id"
|
@@ -90,25 +90,32 @@ module InheritedResources
|
|
90
90
|
# as parent types.
|
91
91
|
#
|
92
92
|
def parent_type
|
93
|
+
unless @parent_type
|
94
|
+
symbols_for_association_chain
|
95
|
+
end
|
96
|
+
|
93
97
|
@parent_type
|
94
98
|
end
|
95
99
|
|
96
100
|
def parent_class
|
97
|
-
parent.class if
|
101
|
+
parent.class if parent_type
|
98
102
|
end
|
99
103
|
|
100
104
|
# Returns the parent object. They are also available with the instance
|
101
105
|
# variable name: @task, @file, @note...
|
102
106
|
#
|
103
107
|
def parent
|
104
|
-
|
108
|
+
if parent_type
|
109
|
+
p = instance_variable_get("@#{parent_type}")
|
110
|
+
p || instance_variable_set("@#{parent_type}", association_chain[-1])
|
111
|
+
end
|
105
112
|
end
|
106
113
|
|
107
114
|
# If the polymorphic association is optional, we might not have a parent.
|
108
115
|
#
|
109
116
|
def parent?
|
110
117
|
if resources_configuration[:polymorphic][:optional]
|
111
|
-
parents_symbols.size > 1 ||
|
118
|
+
parents_symbols.size > 1 || !parent_type.nil?
|
112
119
|
else
|
113
120
|
true
|
114
121
|
end
|
data/test/class_methods_test.rb
CHANGED
@@ -59,15 +59,15 @@ class NestedModelWithShallowTest < ActionController::TestCase
|
|
59
59
|
|
60
60
|
def test_expose_a_newly_create_group_with_speciality
|
61
61
|
Speciality.expects(:find).with('37').twice.returns(mock_speciality)
|
62
|
-
Plan::Group.expects(:build).with({'these' =>
|
63
|
-
post :create, :speciality_id => '37', :group => {
|
62
|
+
Plan::Group.expects(:build).with({'these' => 'params'}).returns(mock_group(:save => true))
|
63
|
+
post :create, :speciality_id => '37', :group => {'these' => 'params'}
|
64
64
|
assert_equal mock_group, assigns(:group)
|
65
65
|
end
|
66
66
|
|
67
67
|
def test_expose_a_update_group_with_speciality
|
68
68
|
should_find_parents
|
69
|
-
mock_group.expects(:update_attributes).with('these' =>
|
70
|
-
post :update, :id => 'forty_two', :group => {
|
69
|
+
mock_group.expects(:update_attributes).with('these' => 'params').returns(true)
|
70
|
+
post :update, :id => 'forty_two', :group => {'these' => 'params'}
|
71
71
|
assert_equal mock_group, assigns(:group)
|
72
72
|
end
|
73
73
|
|
data/test/polymorphic_test.rb
CHANGED
@@ -2,6 +2,8 @@ require File.expand_path('test_helper', File.dirname(__FILE__))
|
|
2
2
|
|
3
3
|
class Factory; end
|
4
4
|
class Company; end
|
5
|
+
class User; end
|
6
|
+
class Photo; end
|
5
7
|
|
6
8
|
class Employee
|
7
9
|
def self.human_name; 'Employee'; end
|
@@ -11,6 +13,15 @@ class EmployeesController < InheritedResources::Base
|
|
11
13
|
belongs_to :factory, :company, :polymorphic => true
|
12
14
|
end
|
13
15
|
|
16
|
+
class PhotosController < InheritedResources::Base
|
17
|
+
belongs_to :user, :task, :polymorphic => true
|
18
|
+
|
19
|
+
def index
|
20
|
+
parent
|
21
|
+
# Overwrite index
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
14
25
|
class PolymorphicFactoriesTest < ActionController::TestCase
|
15
26
|
tests EmployeesController
|
16
27
|
|
@@ -184,3 +195,21 @@ class PolymorphicCompanyTest < ActionController::TestCase
|
|
184
195
|
@mock_employee ||= mock(stubs)
|
185
196
|
end
|
186
197
|
end
|
198
|
+
|
199
|
+
class PolymorphicPhotosTest < ActionController::TestCase
|
200
|
+
tests PhotosController
|
201
|
+
|
202
|
+
def setup
|
203
|
+
User.expects(:find).with('37').returns(mock_user)
|
204
|
+
end
|
205
|
+
|
206
|
+
def test_parent_as_instance_variable_on_index_when_method_overwritten
|
207
|
+
get :index, :user_id => '37'
|
208
|
+
assert_equal mock_user, assigns(:user)
|
209
|
+
end
|
210
|
+
|
211
|
+
protected
|
212
|
+
def mock_user(stubs={})
|
213
|
+
@mock_user ||= mock(stubs)
|
214
|
+
end
|
215
|
+
end
|
data/test/url_helpers_test.rb
CHANGED
@@ -126,8 +126,7 @@ end
|
|
126
126
|
# Create a TestHelper module with some helpers
|
127
127
|
class UrlHelpersTest < ActiveSupport::TestCase
|
128
128
|
def mock_polymorphic(controller, route)
|
129
|
-
controller.expects(
|
130
|
-
controller._routes.url_helpers.expects("hash_for_#{route}").returns({:no=>"no"})
|
129
|
+
controller.expects(route)
|
131
130
|
end
|
132
131
|
|
133
132
|
def test_url_helpers_on_simple_inherited_resource
|
@@ -669,7 +668,7 @@ class UrlHelpersTest < ActiveSupport::TestCase
|
|
669
668
|
new_bed.stubs(:persisted?).returns(false)
|
670
669
|
|
671
670
|
controller = BedsController.new
|
672
|
-
controller.
|
671
|
+
controller.stubs(:parent_type).returns(nil)
|
673
672
|
controller.instance_variable_set('@bed', bed)
|
674
673
|
|
675
674
|
[:url, :path].each do |path_or_url|
|
@@ -0,0 +1 @@
|
|
1
|
+
Index HTML
|
metadata
CHANGED
@@ -1,64 +1,45 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: inherited_resources
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.3.1
|
5
5
|
prerelease:
|
6
|
-
segments:
|
7
|
-
- 1
|
8
|
-
- 3
|
9
|
-
- 0
|
10
|
-
version: 1.3.0
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
13
|
-
-
|
7
|
+
authors:
|
8
|
+
- José Valim
|
14
9
|
autorequire:
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
dependencies:
|
21
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2012-03-08 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
22
15
|
name: responders
|
23
|
-
|
24
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
16
|
+
requirement: &70244803257400 !ruby/object:Gem::Requirement
|
25
17
|
none: false
|
26
|
-
requirements:
|
18
|
+
requirements:
|
27
19
|
- - ~>
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
|
30
|
-
segments:
|
31
|
-
- 0
|
32
|
-
- 6
|
33
|
-
- 0
|
34
|
-
version: 0.6.0
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0.6'
|
35
22
|
type: :runtime
|
36
|
-
version_requirements: *id001
|
37
|
-
- !ruby/object:Gem::Dependency
|
38
|
-
name: has_scope
|
39
23
|
prerelease: false
|
40
|
-
|
24
|
+
version_requirements: *70244803257400
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: has_scope
|
27
|
+
requirement: &70244803256640 !ruby/object:Gem::Requirement
|
41
28
|
none: false
|
42
|
-
requirements:
|
29
|
+
requirements:
|
43
30
|
- - ~>
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
hash: 11
|
46
|
-
segments:
|
47
|
-
- 0
|
48
|
-
- 5
|
49
|
-
- 0
|
31
|
+
- !ruby/object:Gem::Version
|
50
32
|
version: 0.5.0
|
51
33
|
type: :runtime
|
52
|
-
|
53
|
-
|
34
|
+
prerelease: false
|
35
|
+
version_requirements: *70244803256640
|
36
|
+
description: Inherited Resources speeds up development by making your controllers
|
37
|
+
inherit all restful actions so you just have to focus on what is important.
|
54
38
|
email: developers@plataformatec.com.br
|
55
39
|
executables: []
|
56
|
-
|
57
40
|
extensions: []
|
58
|
-
|
59
41
|
extra_rdoc_files: []
|
60
|
-
|
61
|
-
files:
|
42
|
+
files:
|
62
43
|
- .gitignore
|
63
44
|
- CHANGELOG
|
64
45
|
- Gemfile
|
@@ -134,6 +115,7 @@ files:
|
|
134
115
|
- test/views/pets/index.html.erb
|
135
116
|
- test/views/pets/new.html.erb
|
136
117
|
- test/views/pets/show.html.erb
|
118
|
+
- test/views/photos/index.html.erb
|
137
119
|
- test/views/plates/edit.html.erb
|
138
120
|
- test/views/plates/index.html.erb
|
139
121
|
- test/views/plates/new.html.erb
|
@@ -174,41 +156,38 @@ files:
|
|
174
156
|
- test/views/users/new.html.erb
|
175
157
|
- test/views/users/show.html.erb
|
176
158
|
- test/views/users/update.js.erb
|
177
|
-
has_rdoc: true
|
178
159
|
homepage: http://github.com/josevalim/inherited_resources
|
179
160
|
licenses: []
|
180
|
-
|
181
161
|
post_install_message:
|
182
162
|
rdoc_options: []
|
183
|
-
|
184
|
-
require_paths:
|
163
|
+
require_paths:
|
185
164
|
- lib
|
186
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
165
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
187
166
|
none: false
|
188
|
-
requirements:
|
189
|
-
- -
|
190
|
-
- !ruby/object:Gem::Version
|
191
|
-
|
192
|
-
segments:
|
167
|
+
requirements:
|
168
|
+
- - ! '>='
|
169
|
+
- !ruby/object:Gem::Version
|
170
|
+
version: '0'
|
171
|
+
segments:
|
193
172
|
- 0
|
194
|
-
|
195
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
173
|
+
hash: 2360799182694923826
|
174
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
196
175
|
none: false
|
197
|
-
requirements:
|
198
|
-
- -
|
199
|
-
- !ruby/object:Gem::Version
|
200
|
-
|
201
|
-
segments:
|
176
|
+
requirements:
|
177
|
+
- - ! '>='
|
178
|
+
- !ruby/object:Gem::Version
|
179
|
+
version: '0'
|
180
|
+
segments:
|
202
181
|
- 0
|
203
|
-
|
182
|
+
hash: 2360799182694923826
|
204
183
|
requirements: []
|
205
|
-
|
206
184
|
rubyforge_project: inherited_resources
|
207
|
-
rubygems_version: 1.
|
185
|
+
rubygems_version: 1.8.11
|
208
186
|
signing_key:
|
209
187
|
specification_version: 3
|
210
|
-
summary: Inherited Resources speeds up development by making your controllers inherit
|
211
|
-
|
188
|
+
summary: Inherited Resources speeds up development by making your controllers inherit
|
189
|
+
all restful actions so you just have to focus on what is important.
|
190
|
+
test_files:
|
212
191
|
- test/aliases_test.rb
|
213
192
|
- test/association_chain_test.rb
|
214
193
|
- test/base_test.rb
|
@@ -259,6 +238,7 @@ test_files:
|
|
259
238
|
- test/views/pets/index.html.erb
|
260
239
|
- test/views/pets/new.html.erb
|
261
240
|
- test/views/pets/show.html.erb
|
241
|
+
- test/views/photos/index.html.erb
|
262
242
|
- test/views/plates/edit.html.erb
|
263
243
|
- test/views/plates/index.html.erb
|
264
244
|
- test/views/plates/new.html.erb
|