i18n_rails_helpers 0.18.1 → 0.18.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.
@@ -2,7 +2,10 @@ module ContextualLinkHelpers
|
|
2
2
|
# CRUD helpers
|
3
3
|
def icon_link_to(action, url = nil, options = {})
|
4
4
|
url ||= {:action => action}
|
5
|
-
options.
|
5
|
+
icon = options.delete(:icon)
|
6
|
+
icon ||= action
|
7
|
+
|
8
|
+
options.merge!(:class => "icon icon-#{icon}")
|
6
9
|
|
7
10
|
link_to(t_action(action), url_for(url), options)
|
8
11
|
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:
|
4
|
+
hash: 83
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 18
|
9
|
-
-
|
10
|
-
version: 0.18.
|
9
|
+
- 2
|
10
|
+
version: 0.18.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- "Simon H\xC3\xBCrlimann (CyT)"
|