bootstrap_helpers 0.0.3 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module BootstrapHelpers
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.5"
3
3
  end
@@ -26,16 +26,17 @@ module BootstrapHelpers
26
26
  def bootstrap_form_input(title, params={})
27
27
  params[:class]="clearfix #{params[:class]}"
28
28
  content_tag :div, params do
29
- content_tag(:label, title) + content_tag(:div, :class=>'input') { yield }
29
+ concat content_tag(:label, title)
30
+ concat content_tag(:div, :class=>'input') { yield }
30
31
  end
31
32
  end
32
33
 
33
34
  def bootstrap_prepended_input(title, symbol, params={})
34
35
  bootstrap_form_input(title, params) do
35
- concat (content_tag(:div, :class=>'input-prepend') do
36
- concat concat_tag :span, symbol, :class=>'add-on'
37
- yield
38
- end)
36
+ content_tag(:div, :class=>'input-prepend') do
37
+ concat content_tag(:span, symbol, :class=>'add-on')
38
+ concat yield
39
+ end
39
40
  end
40
41
  end
41
42
 
@@ -7,7 +7,7 @@ gem 'rails', '3.0.10'
7
7
 
8
8
  gem 'sqlite3'
9
9
  gem 'jquery-rails'
10
- gem 'bootstrap_helpers', '0.0.3'
10
+ gem 'bootstrap_helpers'
11
11
 
12
12
  group :test do
13
13
  gem 'rspec-rails', ">=2.5.0"
@@ -3,6 +3,7 @@
3
3
  <%= bootstrap_form_input ("Custom class", :class=>'custom_class') do%>
4
4
  <h2>nvsdnsksdn</h2>
5
5
  <%end%>
6
+ <%= bootstrap_prepended_input("Prepend Input", '%', :class=>'prepended_input') {text_field_tag 'something'}%>
6
7
  <%= bootstrap_form_actions(:class=>'another_action') do%>
7
8
  <%= link_to 'Foo', '#', :class=>'btn'%>
8
9
  <%= link_to 'Boo', '#', :class=>'btn info'%>
@@ -33,4 +33,10 @@ describe SamplesController do
33
33
  page.should have_selector("form.sample select")
34
34
  end
35
35
 
36
+ it 'should generate bootstrap_prepended_input', :focus=>true do
37
+ visit root_path
38
+ page.should have_selector('div.prepended_input')
39
+ page.should have_selector("div.prepended_input .input-prepend .add-on", :text=>'%')
40
+ end
41
+
36
42
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bootstrap_helpers
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 21
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 3
10
- version: 0.0.3
9
+ - 5
10
+ version: 0.0.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Sergey Pchelincev