inherited_resources_views 0.1.2 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +1 -2
- data/Rakefile +2 -2
- data/app/views/inherited_resources/_form.html.erb +1 -1
- data/inherited_resources_views.gemspec +6 -5
- data/init.rb +1 -0
- data/lib/inherited_resources_views/action_view.rb +7 -0
- metadata +6 -9
data/README.md
CHANGED
@@ -25,7 +25,6 @@ If you are confused about the difference to some other similarly named projects,
|
|
25
25
|
|
26
26
|
## Dependencies
|
27
27
|
|
28
|
-
* **Rails 3.0+**
|
29
28
|
* [Inherited Resources](http://github.com/josevalim/inherited_resources)
|
30
29
|
|
31
30
|
## Installation
|
@@ -44,7 +43,7 @@ It is *extremely* simple to use Inherited Resources Views. The only step you nee
|
|
44
43
|
|
45
44
|
rails generate inherited_resources_views
|
46
45
|
|
47
|
-
This will generate a set of views in your `app/views/
|
46
|
+
This will generate a set of views in your `app/views/inherited_resources` folder. Edit away!
|
48
47
|
|
49
48
|
## Author
|
50
49
|
|
data/Rakefile
CHANGED
@@ -26,13 +26,13 @@ begin
|
|
26
26
|
require 'jeweler'
|
27
27
|
Jeweler::Tasks.new do |s|
|
28
28
|
s.name = "inherited_resources_views"
|
29
|
-
s.version = "0.
|
29
|
+
s.version = "0.2.0"
|
30
30
|
s.summary = "A lot of times resources share the same views, so why not DRY 'em up using Inherited Resources Views!"
|
31
31
|
s.description = "Using Inherited Resources is an excellent way to reduce the amount of repetition in your controllers. But what about views? A lot of times resources share the same views, so why not DRY 'em up using Inherited Resources Views!"
|
32
32
|
s.email = "ifredwu@gmail.com"
|
33
33
|
s.homepage = "http://github.com/fredwu/inherited_resources_views"
|
34
34
|
s.authors = ["Fred Wu"]
|
35
|
-
s.add_dependency("inherited_resources", ">= 1.
|
35
|
+
s.add_dependency("inherited_resources", ">= 1.0")
|
36
36
|
end
|
37
37
|
Jeweler::GemcutterTasks.new
|
38
38
|
rescue LoadError
|
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{inherited_resources_views}
|
8
|
-
s.version = "0.
|
8
|
+
s.version = "0.2.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Fred Wu"]
|
12
|
-
s.date = %q{2010-08-
|
12
|
+
s.date = %q{2010-08-07}
|
13
13
|
s.description = %q{Using Inherited Resources is an excellent way to reduce the amount of repetition in your controllers. But what about views? A lot of times resources share the same views, so why not DRY 'em up using Inherited Resources Views!}
|
14
14
|
s.email = %q{ifredwu@gmail.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -26,6 +26,7 @@ Gem::Specification.new do |s|
|
|
26
26
|
"app/views/inherited_resources/new.html.erb",
|
27
27
|
"app/views/inherited_resources/show.html.erb",
|
28
28
|
"inherited_resources_views.gemspec",
|
29
|
+
"init.rb",
|
29
30
|
"lib/generators/inherited_resources_views_generator.rb",
|
30
31
|
"lib/inherited_resources_views.rb",
|
31
32
|
"lib/inherited_resources_views/action_view.rb",
|
@@ -47,12 +48,12 @@ Gem::Specification.new do |s|
|
|
47
48
|
s.specification_version = 3
|
48
49
|
|
49
50
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
50
|
-
s.add_runtime_dependency(%q<inherited_resources>, [">= 1.
|
51
|
+
s.add_runtime_dependency(%q<inherited_resources>, [">= 1.0"])
|
51
52
|
else
|
52
|
-
s.add_dependency(%q<inherited_resources>, [">= 1.
|
53
|
+
s.add_dependency(%q<inherited_resources>, [">= 1.0"])
|
53
54
|
end
|
54
55
|
else
|
55
|
-
s.add_dependency(%q<inherited_resources>, [">= 1.
|
56
|
+
s.add_dependency(%q<inherited_resources>, [">= 1.0"])
|
56
57
|
end
|
57
58
|
end
|
58
59
|
|
data/init.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "inherited_resources_views"
|
@@ -14,6 +14,13 @@ module InheritedResourcesViews
|
|
14
14
|
rescue ::ActionView::MissingTemplate
|
15
15
|
super(path, "inherited_resources", partial, details, key)
|
16
16
|
end
|
17
|
+
|
18
|
+
def find_template(original_template_path, format = nil, html_fallback = true)
|
19
|
+
super
|
20
|
+
rescue ::ActionView::MissingTemplate
|
21
|
+
original_template_path.sub!(/^[\w]+/, "inherited_resources")
|
22
|
+
super
|
23
|
+
end
|
17
24
|
end
|
18
25
|
end
|
19
26
|
end
|
metadata
CHANGED
@@ -1,13 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: inherited_resources_views
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash: 31
|
5
4
|
prerelease: false
|
6
5
|
segments:
|
7
6
|
- 0
|
8
|
-
- 1
|
9
7
|
- 2
|
10
|
-
|
8
|
+
- 0
|
9
|
+
version: 0.2.0
|
11
10
|
platform: ruby
|
12
11
|
authors:
|
13
12
|
- Fred Wu
|
@@ -15,7 +14,7 @@ autorequire:
|
|
15
14
|
bindir: bin
|
16
15
|
cert_chain: []
|
17
16
|
|
18
|
-
date: 2010-08-
|
17
|
+
date: 2010-08-07 00:00:00 +10:00
|
19
18
|
default_executable:
|
20
19
|
dependencies:
|
21
20
|
- !ruby/object:Gem::Dependency
|
@@ -26,11 +25,10 @@ dependencies:
|
|
26
25
|
requirements:
|
27
26
|
- - ">="
|
28
27
|
- !ruby/object:Gem::Version
|
29
|
-
hash: 13
|
30
28
|
segments:
|
31
29
|
- 1
|
32
|
-
-
|
33
|
-
version: "1.
|
30
|
+
- 0
|
31
|
+
version: "1.0"
|
34
32
|
type: :runtime
|
35
33
|
version_requirements: *id001
|
36
34
|
description: Using Inherited Resources is an excellent way to reduce the amount of repetition in your controllers. But what about views? A lot of times resources share the same views, so why not DRY 'em up using Inherited Resources Views!
|
@@ -52,6 +50,7 @@ files:
|
|
52
50
|
- app/views/inherited_resources/new.html.erb
|
53
51
|
- app/views/inherited_resources/show.html.erb
|
54
52
|
- inherited_resources_views.gemspec
|
53
|
+
- init.rb
|
55
54
|
- lib/generators/inherited_resources_views_generator.rb
|
56
55
|
- lib/inherited_resources_views.rb
|
57
56
|
- lib/inherited_resources_views/action_view.rb
|
@@ -71,7 +70,6 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
71
70
|
requirements:
|
72
71
|
- - ">="
|
73
72
|
- !ruby/object:Gem::Version
|
74
|
-
hash: 3
|
75
73
|
segments:
|
76
74
|
- 0
|
77
75
|
version: "0"
|
@@ -80,7 +78,6 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
80
78
|
requirements:
|
81
79
|
- - ">="
|
82
80
|
- !ruby/object:Gem::Version
|
83
|
-
hash: 3
|
84
81
|
segments:
|
85
82
|
- 0
|
86
83
|
version: "0"
|