twitter-bootstrap-helpers 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module TwitterBootstrapHelpers
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -3,33 +3,33 @@ module TwitterBootstrapHelpers
3
3
  def icon_for(icon_name)
4
4
  content_tag :i, '', :class => "icon-#{icon_name}"
5
5
  end
6
- end
7
6
 
8
- def alert_message(opts = {}, &block)
9
- alert_classes = ["alert"]
10
- alert_classes << "alert-#{opts[:type]}" if opts[:type]
11
- alert_classes << opts[:class] if opts[:class]
7
+ def alert_message(opts = {}, &block)
8
+ alert_classes = ["alert"]
9
+ alert_classes << "alert-#{opts[:type]}" if opts[:type]
10
+ alert_classes << opts[:class] if opts[:class]
12
11
 
13
- contents = capture(&block)
12
+ contents = capture(&block)
14
13
 
15
- if opts[:heading]
16
- alert_classes << "alert-block"
17
- contents = alert_heading_tag + contents
18
- end
14
+ if opts[:heading]
15
+ alert_classes << "alert-block"
16
+ contents = alert_heading_tag + contents
17
+ end
19
18
 
20
- if opts[:show_close_button]
21
- contents = alert_close_tag + contents
19
+ if opts[:show_close_button]
20
+ contents = alert_close_tag + contents
21
+ end
22
+
23
+ content_tag :div, contents, :class => alert_classes.join(' ')
22
24
  end
23
25
 
24
- content_tag :div, contents, :class => alert_classes.join(' ')
25
- end
26
+ def alert_close_tag
27
+ content_tag(:a, 'x', :class => 'close', :data => {:dismiss => 'alert'})
28
+ end
26
29
 
27
- def alert_close_tag
28
- content_tag(:a, 'x', :class => 'close', :data => {:dismiss => 'alert'})
29
- end
30
+ def alert_heading_tag(heading)
31
+ contents = content_tag(:h4, heading, :class => 'alert-heading')
32
+ end
30
33
 
31
- def alert_heading_tag(heading)
32
- contents = content_tag(:h4, heading, :class => 'alert-heading')
33
34
  end
34
-
35
35
  end
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.0.2
4
+ version: 0.0.3
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-05-14 00:00:00.000000000Z
12
+ date: 2012-05-14 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:
@@ -48,7 +48,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
48
48
  version: '0'
49
49
  requirements: []
50
50
  rubyforge_project:
51
- rubygems_version: 1.8.10
51
+ rubygems_version: 1.8.24
52
52
  signing_key:
53
53
  specification_version: 3
54
54
  summary: A set of Ruby on Rails view helpers to be used with Twitter Bootstrap