dust-generators 0.1.8 → 0.1.9
Sign up to get free protection for your applications and to get access to all the features.
data/lib/dust/version.rb
CHANGED
@@ -86,11 +86,11 @@ class DustScaffoldGenerator < Rails::Generator::Base
|
|
86
86
|
m.template "view_controller.rb", "app/controllers/view_#{plural_name}_controller.rb"
|
87
87
|
|
88
88
|
m.route :name => "view_#{plural_name}",
|
89
|
-
:url => "
|
89
|
+
:url => "view-#{plural_name}",
|
90
90
|
:controller => "view_#{plural_name}",
|
91
91
|
:action => 'index'
|
92
92
|
m.route :name => "view_#{singular_name}",
|
93
|
-
:url => "
|
93
|
+
:url => "view-#{singular_name}/:filename",
|
94
94
|
:controller => "view_#{plural_name}",
|
95
95
|
:action => 'show'
|
96
96
|
|
@@ -12,7 +12,7 @@ class Create<%= plural_class_name %> < ActiveRecord::Migration
|
|
12
12
|
end
|
13
13
|
|
14
14
|
AdminMenuItem.create({:title =>"<%= plural_class_name %>", :controller_name => "<%= plural_name %>", :url => "/<%= plural_name %>"})
|
15
|
-
MenuItem.create({:title => "View <%= plural_class_name %>", :url => "/
|
15
|
+
MenuItem.create({:title => "View <%= plural_class_name %>", :url => "/view-<%= plural_name %>", :active => true})
|
16
16
|
|
17
17
|
def self.down
|
18
18
|
drop_table :<%= plural_name %>
|
@@ -20,7 +20,7 @@ class <%= class_name %> < ActiveRecord::Base
|
|
20
20
|
else
|
21
21
|
@menu_item.update_attributes(
|
22
22
|
:title => self.<%= first_attribute.name %>,
|
23
|
-
:url => "/
|
23
|
+
:url => "/view-<%= singular_name %>/#{self.<%= first_attribute.name %>}",
|
24
24
|
:active => self.<%= first_attribute.name %>
|
25
25
|
)
|
26
26
|
end
|
@@ -29,7 +29,7 @@ class <%= class_name %> < ActiveRecord::Base
|
|
29
29
|
def create_menu_item
|
30
30
|
@menu_item = self.build_menu_item(
|
31
31
|
:title => self.<%= first_attribute.name %>,
|
32
|
-
:url => "/
|
32
|
+
:url => "/view-<%= singular_name %>/#{<%= first_attribute.name %>}",
|
33
33
|
:active => self.<%= first_attribute.name %>
|
34
34
|
)
|
35
35
|
@menu_item.save
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
version: 0.1.
|
8
|
+
- 9
|
9
|
+
version: 0.1.9
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- rossnelson
|
@@ -302,7 +302,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
302
302
|
requirements:
|
303
303
|
- - ">="
|
304
304
|
- !ruby/object:Gem::Version
|
305
|
-
hash:
|
305
|
+
hash: 4403565935630074462
|
306
306
|
segments:
|
307
307
|
- 0
|
308
308
|
version: "0"
|