i18n_rails_helpers 0.18.1 → 0.18.2
Sign up to get free protection for your applications and to get access to all the features.
@@ -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)"
|