scaffold_logic 1.7.0 → 1.7.1

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/VERSION CHANGED
@@ -1 +1 @@
1
- 1.7.0
1
+ 1.7.1
@@ -184,10 +184,15 @@ module ScaffoldLogic
184
184
  end
185
185
 
186
186
  module ActionControllerMixin
187
- # Class methods ==================================================================================
188
- def self.add_breadcrumb name, url, options = {}
189
- before_filter options do |controller|
190
- controller.send :add_breadcrumb, name, url
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
- [:show, :edit, :destroy].each do |action|
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 => "View")
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 => "Edit")
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 << link_to(image_tag('icons/delete.png', :class => 'crud_icon', :width => 14, :height => 14), actions_and_paths[action], :confirm => 'Are you sure? This action cannot be undone.', :method => :delete, :title => "Delete")
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
 
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "scaffold_logic"
8
- s.version = "1.7.0"
8
+ s.version = "1.7.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Corey Ehmke"]
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: 11
4
+ hash: 9
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 7
9
- - 0
10
- version: 1.7.0
9
+ - 1
10
+ version: 1.7.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Corey Ehmke