super_resources 1.0.0.rc4 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/super_resources/resources.rb +2 -2
- data/lib/super_resources/url_helpers.rb +16 -1
- data/lib/super_resources/version.rb +1 -1
- data/super_resources.gemspec +0 -2
- metadata +9 -27
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 6367caad75c74733826387cc186ee34a68ee089b
|
4
|
+
data.tar.gz: c8535e469396cad081eba583566c1dfb187f348e
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: b5f3ee56d37b7041cee9f0e39e7f223f4ca9d56141d8218f211516f0903ac6fcdc90ab47c1c610981eda7984f6f1f775294fd5af81ba0b425cc93ced1731dfaa
|
7
|
+
data.tar.gz: 4a4bd5d50f8888e2b56ae53a6124edb928963393b3cc41de3ffbb4966bbfea4478382dc32f01be0fc47edf76ecd3cc5b1e02bf1a6aa1912049e39b1e15a8fc0d
|
@@ -30,7 +30,7 @@ module SuperResources
|
|
30
30
|
end
|
31
31
|
|
32
32
|
def memoize_collection(&block)
|
33
|
-
@
|
33
|
+
@_collection ||= block.call
|
34
34
|
end
|
35
35
|
|
36
36
|
def collection?
|
@@ -42,7 +42,7 @@ module SuperResources
|
|
42
42
|
end
|
43
43
|
|
44
44
|
def memoize_resource(&block)
|
45
|
-
@
|
45
|
+
@_resource ||= block.call
|
46
46
|
end
|
47
47
|
|
48
48
|
def resource?
|
@@ -3,7 +3,7 @@ module SuperResources
|
|
3
3
|
extend ActiveSupport::Concern
|
4
4
|
|
5
5
|
included do
|
6
|
-
helpers = %w(collection resource new_resource edit_resource)
|
6
|
+
helpers = %w(collection resource new_resource edit_resource parent)
|
7
7
|
helper_methods = helpers.map do |helper|
|
8
8
|
[ :"#{helper}_path", :"hash_for_#{helper}_path",
|
9
9
|
:"#{helper}_url", :"hash_for_#{helper}_url" ]
|
@@ -102,5 +102,20 @@ module SuperResources
|
|
102
102
|
route_hash.merge(options)
|
103
103
|
.merge(:action => 'edit', :id => args.first || resource)
|
104
104
|
end
|
105
|
+
|
106
|
+
# parent path helpers ......................................................
|
107
|
+
|
108
|
+
def parent_path(options={})
|
109
|
+
super_path(association_chain, options)
|
110
|
+
end
|
111
|
+
|
112
|
+
def parent_url(options={})
|
113
|
+
super_path(association_chain, options)
|
114
|
+
end
|
115
|
+
|
116
|
+
def hash_for_parent_path(options={})
|
117
|
+
# TODO: mess around with this sucker
|
118
|
+
raise NotImplementedException
|
119
|
+
end
|
105
120
|
end
|
106
121
|
end
|
data/super_resources.gemspec
CHANGED
metadata
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: super_resources
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0
|
5
|
-
prerelease: 6
|
4
|
+
version: 1.0.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Ben Caldwell
|
@@ -10,24 +9,8 @@ authors:
|
|
10
9
|
autorequire:
|
11
10
|
bindir: bin
|
12
11
|
cert_chain: []
|
13
|
-
date: 2013-
|
14
|
-
dependencies:
|
15
|
-
- !ruby/object:Gem::Dependency
|
16
|
-
name: railties
|
17
|
-
requirement: !ruby/object:Gem::Requirement
|
18
|
-
none: false
|
19
|
-
requirements:
|
20
|
-
- - ~>
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: '3.2'
|
23
|
-
type: :runtime
|
24
|
-
prerelease: false
|
25
|
-
version_requirements: !ruby/object:Gem::Requirement
|
26
|
-
none: false
|
27
|
-
requirements:
|
28
|
-
- - ~>
|
29
|
-
- !ruby/object:Gem::Version
|
30
|
-
version: '3.2'
|
12
|
+
date: 2013-07-10 00:00:00.000000000 Z
|
13
|
+
dependencies: []
|
31
14
|
description: SuperResources DRYs up your controller code.
|
32
15
|
email:
|
33
16
|
- ben@habanerohq.com
|
@@ -118,27 +101,26 @@ files:
|
|
118
101
|
- super_resources.gemspec
|
119
102
|
homepage: https://github.com/habanerohq/super_resources
|
120
103
|
licenses: []
|
104
|
+
metadata: {}
|
121
105
|
post_install_message:
|
122
106
|
rdoc_options: []
|
123
107
|
require_paths:
|
124
108
|
- lib
|
125
109
|
required_ruby_version: !ruby/object:Gem::Requirement
|
126
|
-
none: false
|
127
110
|
requirements:
|
128
|
-
- -
|
111
|
+
- - '>='
|
129
112
|
- !ruby/object:Gem::Version
|
130
113
|
version: '0'
|
131
114
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
132
|
-
none: false
|
133
115
|
requirements:
|
134
|
-
- -
|
116
|
+
- - '>='
|
135
117
|
- !ruby/object:Gem::Version
|
136
|
-
version:
|
118
|
+
version: '0'
|
137
119
|
requirements: []
|
138
120
|
rubyforge_project:
|
139
|
-
rubygems_version:
|
121
|
+
rubygems_version: 2.0.3
|
140
122
|
signing_key:
|
141
|
-
specification_version:
|
123
|
+
specification_version: 4
|
142
124
|
summary: SuperResources DRYs up your controller code.
|
143
125
|
test_files:
|
144
126
|
- spec/controllers/actions_nested_spec.rb
|