inherited_resources_views 0.1.1 → 0.1.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/Rakefile CHANGED
@@ -26,7 +26,7 @@ begin
26
26
  require 'jeweler'
27
27
  Jeweler::Tasks.new do |s|
28
28
  s.name = "inherited_resources_views"
29
- s.version = "0.1.1"
29
+ s.version = "0.1.2"
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"
@@ -1,4 +1,4 @@
1
1
  <%= render "form" %>
2
2
 
3
3
  <p><%= link_to "Show", resource %></p>
4
- <p><%= link_to "Back", eval("#{controller_name}_path") %></p>
4
+ <p><%= link_to "Back", polymorphic_path(controller_name) %></p>
@@ -1,4 +1,4 @@
1
- <p><%= link_to "New", eval("new_#{controller_name.singularize}_path") %></p>
1
+ <p><%= link_to "New", new_polymorphic_path(controller_name.singularize) %></p>
2
2
 
3
3
  <% if collection.any? %>
4
4
  <table>
@@ -16,7 +16,7 @@
16
16
  <td><%= a[1] %></td>
17
17
  <% end %>
18
18
  <td><%= link_to "Show", r %></td>
19
- <td><%= link_to "Edit", eval("edit_#{controller_name.singularize}_path(r)") %></td>
19
+ <td><%= link_to "Edit", edit_polymorphic_path(r) %></td>
20
20
  <td><%= link_to "Destroy", r, :confirm => 'Are you sure?', :method => :delete %></td>
21
21
  </tr>
22
22
  <% end %>
@@ -1,3 +1,3 @@
1
1
  <%= render "form" %>
2
2
 
3
- <p><%= link_to "Back", eval("#{controller_name}_path") %></p>
3
+ <p><%= link_to "Back", polymorphic_path(controller_name) %></p>
@@ -7,5 +7,5 @@
7
7
  <% end %>
8
8
  </table>
9
9
 
10
- <p><%= link_to "Edit", eval("edit_#{controller_name.singularize}_path(resource)") %></p>
11
- <p><%= link_to "Back", eval("#{controller_name}_path") %></p>
10
+ <p><%= link_to "Edit", edit_polymorphic_path(resource) %></p>
11
+ <p><%= link_to "Back", polymorphic_path(controller_name) %></p>
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{inherited_resources_views}
8
- s.version = "0.1.1"
8
+ s.version = "0.1.2"
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"]
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inherited_resources_views
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 31
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 1
10
- version: 0.1.1
9
+ - 2
10
+ version: 0.1.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Fred Wu