scaffold_logic 1.7.0 → 1.7.1
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/scaffold_logic.rb +9 -4
- data/lib/scaffold_logic/helper.rb +4 -4
- data/scaffold_logic.gemspec +1 -1
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.7.
|
1
|
+
1.7.1
|
data/lib/scaffold_logic.rb
CHANGED
@@ -184,10 +184,15 @@ module ScaffoldLogic
|
|
184
184
|
end
|
185
185
|
|
186
186
|
module ActionControllerMixin
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
187
|
+
def self.included base
|
188
|
+
base.extend ClassMethods
|
189
|
+
end
|
190
|
+
|
191
|
+
module ClassMethods
|
192
|
+
def add_breadcrumb name, url, options = {}
|
193
|
+
before_filter options do |controller|
|
194
|
+
controller.send :add_breadcrumb, name, url
|
195
|
+
end
|
191
196
|
end
|
192
197
|
end
|
193
198
|
|
@@ -50,15 +50,15 @@ module ScaffoldLogic
|
|
50
50
|
def crud_links_for_actions_and_paths(actions_and_paths)
|
51
51
|
_html = ''
|
52
52
|
|
53
|
-
[:
|
53
|
+
[:destroy, :edit, :show].each do |action|
|
54
54
|
next unless actions_and_paths.key?(action)
|
55
55
|
|
56
56
|
if action == :show
|
57
|
-
_html << link_to(image_tag('icons/view.png', :class => 'crud_icon', :width => 14, :height => 14), actions_and_paths[action], :title =>
|
57
|
+
_html << link_to(image_tag('icons/view.png', :class => 'crud_icon', :width => 14, :height => 14), actions_and_paths[action], :title => 'View')
|
58
58
|
elsif action == :edit
|
59
|
-
_html << link_to(image_tag('icons/edit.png', :class => 'crud_icon', :width => 14, :height => 14), actions_and_paths[action], :title =>
|
59
|
+
_html << link_to(image_tag('icons/edit.png', :class => 'crud_icon', :width => 14, :height => 14), actions_and_paths[action], :title => 'Edit')
|
60
60
|
elsif action == :destroy
|
61
|
-
_html <<
|
61
|
+
_html << button_to('', actions_and_paths[action], :class => 'delete_crud_icon', :confirm => 'Are you sure? This action cannot be undone.', :method => :delete)
|
62
62
|
end
|
63
63
|
end
|
64
64
|
|
data/scaffold_logic.gemspec
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: scaffold_logic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 9
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 7
|
9
|
-
-
|
10
|
-
version: 1.7.
|
9
|
+
- 1
|
10
|
+
version: 1.7.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Corey Ehmke
|