mitio-inherited_resources_views 0.4.1 → 0.4.2
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 +4 -1
- data/lib/inherited_resources_views/action_view.rb +2 -1
- metadata +3 -3
data/README.md
CHANGED
@@ -27,12 +27,15 @@ If you are confused about the difference to some other similarly named projects,
|
|
27
27
|
|
28
28
|
Add it to your `Gemfile`:
|
29
29
|
|
30
|
-
gem
|
30
|
+
gem 'mitio-inherited_resources_views'
|
31
31
|
|
32
32
|
Install using `bundle`:
|
33
33
|
|
34
34
|
bundle install
|
35
35
|
|
36
|
+
You also need to require the proper library in order to "inject" the necessary code into `ActionView`. For example, in a file under `config/initializers` add the following code:
|
37
|
+
|
38
|
+
require 'inherited_resources_views'
|
36
39
|
|
37
40
|
## Usage
|
38
41
|
|
@@ -12,7 +12,8 @@ module InheritedResourcesViews
|
|
12
12
|
def find(path, prefix = nil, partial = false, details = {}, key = nil)
|
13
13
|
super
|
14
14
|
rescue ::ActionView::MissingTemplate
|
15
|
-
|
15
|
+
prefix.to_s.sub!(/[\w]+$/, "inherited_resources")
|
16
|
+
super
|
16
17
|
end
|
17
18
|
|
18
19
|
def find_template(original_template_path, format = nil, html_fallback = true)
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 4
|
8
|
-
-
|
9
|
-
version: 0.4.
|
8
|
+
- 2
|
9
|
+
version: 0.4.2
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Fred Wu
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-06-03 00:00:00 +03:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|