i18n_rails_helpers 1.0.2 → 1.0.3

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.
@@ -14,14 +14,22 @@ module ContextualLinkHelpers
14
14
  "list-alt"
15
15
  when "update"
16
16
  "refresh"
17
+ when "copy"
18
+ "repeat"
19
+ else
20
+ action
17
21
  end
18
22
  end
19
23
 
20
24
  def icon_link_to(action, url = nil, options = {})
21
25
  url ||= {:action => action}
26
+
27
+ icon = options.delete(:icon)
28
+ icon ||= action
29
+
22
30
  options.merge!(:class => "btn")
23
31
  link_to(url_for(url), options) do
24
- content_tag(:i, "", :class => "icon-#{action_to_icon(action)}") + " " + t_action(action)
32
+ content_tag(:i, "", :class => "icon-#{action_to_icon(icon)}") + " " + t_action(action)
25
33
  end
26
34
  end
27
35
 
@@ -1,3 +1,3 @@
1
1
  module I18nRailsHelpers
2
- VERSION = "1.0.2"
2
+ VERSION = "1.0.3"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: i18n_rails_helpers
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
4
+ hash: 17
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 2
10
- version: 1.0.2
9
+ - 3
10
+ version: 1.0.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - "Simon H\xC3\xBCrlimann (CyT)"
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-04-03 00:00:00 Z
18
+ date: 2012-04-05 00:00:00 Z
19
19
  dependencies: []
20
20
 
21
21
  description: Rails i18n view helpers for things like crud actions, models and and attributes.