twitter-bootstrap-helpers 0.1.0 → 0.1.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.
@@ -1,3 +1,3 @@
1
1
  module TwitterBootstrapHelpers
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
@@ -1,13 +1,14 @@
1
1
  module TwitterBootstrapHelpers
2
2
  module ViewHelpers
3
3
  def icon_for(icon_name, string = '', icon_position = :left)
4
+ icon_name = icon_name.to_s.gsub('_', '-')
4
5
  classes = ["icon-#{icon_name}"]
5
6
  if string.present?
6
7
  classes << 'on-left' if icon_position == :left
7
8
  classes << 'on-right' if icon_position == :right
8
9
  end
9
10
  icon = content_tag(:i, '', :class => classes)
10
- html = (icon_position == :left) ? icon << string : string << icon
11
+ html = icon_position == :left ? icon + string : string + icon
11
12
  raw(html)
12
13
  end
13
14
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: twitter-bootstrap-helpers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
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: 2012-09-12 00:00:00.000000000 Z
12
+ date: 2012-10-01 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: A set of Ruby on Rails view helpers to be used with Twitter Bootstrap
15
15
  email: