i18n_rails_helpers 1.0.8 → 1.0.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -40,7 +40,7 @@ module ContextualLinkHelpers
40
40
  icon ||= action
41
41
 
42
42
  type = options.delete(:type)
43
- classes << "btn-#{type}"
43
+ classes << "btn-#{type}" unless type.blank?
44
44
 
45
45
  options.merge!(:class => classes.join(" "))
46
46
  link_to(url_for(url), options) do
@@ -124,9 +124,14 @@ module ContextualLinkHelpers
124
124
  return links.join("\n").html_safe
125
125
  end
126
126
 
127
- def contextual_links(action = nil, resource_or_model = nil, options = {})
127
+ def contextual_links(action = nil, resource_or_model = nil, options = {}, &block)
128
128
  content_tag('div', :class => 'contextual') do
129
- contextual_links_for(action, resource_or_model, options)
129
+ content = contextual_links_for(action, resource_or_model, options)
130
+ if block_given?
131
+ additional_content = capture(&block)
132
+ content += ("\n" + additional_content).html_safe
133
+ end
134
+ content
130
135
  end
131
136
  end
132
137
  end
@@ -1,3 +1,3 @@
1
1
  module I18nRailsHelpers
2
- VERSION = "1.0.8"
2
+ VERSION = "1.0.9"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: i18n_rails_helpers
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.8
4
+ version: 1.0.9
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-02-12 00:00:00.000000000 Z
12
+ date: 2014-01-14 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Rails i18n view helpers for things like crud actions, models and and
15
15
  attributes.