tj_bootstrap_helper 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,24 @@
1
1
  module TJBootstrapHelper
2
2
  module Helper
3
+ def record_messages object
4
+ error_messages_for object, :class=>"alert alert-block alert-error", :header_tag=>"h4"
5
+ end
6
+
7
+ def notice_message
8
+ flash_messages = []
9
+ flash.each do |type, message|
10
+ type = case type
11
+ when :notice then :success
12
+ when :alert then :error
13
+ end
14
+ content = content_tag :div, :class => "alert fade in alert-#{type}" do
15
+ button_tag("x", :class => "close", "data-dismiss" => "alert") + message
16
+ end
17
+ flash_messages << content if message.present?
18
+ end
19
+ flash_messages.join("\n").html_safe
20
+ end
21
+
3
22
  # title, size = 1
4
23
  #
5
24
  # size = 1, &block
@@ -1,3 +1,3 @@
1
1
  module TJBootstrapHelper
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.8"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tj_bootstrap_helper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -43,6 +43,22 @@ dependencies:
43
43
  - - ~>
44
44
  - !ruby/object:Gem::Version
45
45
  version: '3.0'
46
+ - !ruby/object:Gem::Dependency
47
+ name: dynamic_form
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ type: :runtime
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
46
62
  - !ruby/object:Gem::Dependency
47
63
  name: sqlite3
48
64
  requirement: !ruby/object:Gem::Requirement
@@ -167,7 +183,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
167
183
  version: '0'
168
184
  segments:
169
185
  - 0
170
- hash: 198587345
186
+ hash: 481314369
171
187
  required_rubygems_version: !ruby/object:Gem::Requirement
172
188
  none: false
173
189
  requirements:
@@ -176,7 +192,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
176
192
  version: '0'
177
193
  segments:
178
194
  - 0
179
- hash: 198587345
195
+ hash: 481314369
180
196
  requirements: []
181
197
  rubyforge_project:
182
198
  rubygems_version: 1.8.24