fwt_bootstrap_rails 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d4ddc783c71ecba3ef9f0370ef779debcb737f9d
4
- data.tar.gz: 7cd2940609213cc67b8000c9a5e2d71a5a171f95
3
+ metadata.gz: 03faadd618e1cf964ef4ea154066a97f8331fa03
4
+ data.tar.gz: 3b1728a1efc224f0386fe0e73af2d008dbca0a71
5
5
  SHA512:
6
- metadata.gz: cacc8f2b56750ad8e7a6b2abb1ee3e0067c68aed92b5ac60cfcf44a02fb2df21a36742c0fc7d60103bc12951ce09d446f2228e9012b38f726a1ff410a32b9eba
7
- data.tar.gz: 662bd046784437e45c86a9f6dc80d68a375ecf8b08648130b168e43bbe34ce9b0ad13c31fc342fa60ce7338999e34514fc1985d2aae275e741543ece2cb5fb3d
6
+ metadata.gz: 6d2f529117619117359ce6a484ff473b4b2cbb76776a473ce645d864d3e5f45cc51d0e3d375e347cd751c825d55c95f8132fb069444b2b3a21e3c29996c524b2
7
+ data.tar.gz: dec4b83eda7e8b7386ebe5674b03ecdddf4d244eeb327dbbc2a51bd8353b7f3688958470e6a550d5a7fd5f492499a6cf140736ed6ec547d956f6d7ce553e4cd0
@@ -88,7 +88,7 @@ class BootstrapFormBuilder < ActionView::Helpers::FormBuilder
88
88
  elsif method_name == :check_box
89
89
  options = args.extract_options!
90
90
  options[:checked] = (@object.send(name) == true)
91
- bootstrap_checkbox(name, super(name, nil, *(args << options)))
91
+ bootstrap_checkbox(name, super(@object_name, name, *(args << options)))
92
92
  else
93
93
  options = args.extract_options!
94
94
  options[:class] = "form-control"
@@ -1,3 +1,3 @@
1
1
  module FwtBootstrapRails
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
@@ -0,0 +1,29 @@
1
+ require 'spec_helper.rb'
2
+ require 'bootstrap_form_builder.rb'
3
+
4
+ class TestHelper < ActionView::Base; end
5
+
6
+ describe BootstrapFormBuilder do
7
+
8
+ describe '#checkbox' do
9
+
10
+ let(:helper) { TestHelper.new }
11
+ let(:resource) { User.new }
12
+ let(:builder) { BootstrapFormBuilder.new :user, resource, helper, {} }
13
+ let(:output) {
14
+ builder.check_box(:administrator)
15
+ }
16
+
17
+ it 'wraps input and label' do
18
+ expect(output).to have_tag('input', :with => { :id => :user_administrator })
19
+ end
20
+
21
+ it 'creates a label' do
22
+ expect(output).to include '<label'
23
+ end
24
+ end
25
+ end
26
+
27
+ class User
28
+ attr_accessor :administrator
29
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fwt_bootstrap_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Brooke-Smith
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-07 00:00:00.000000000 Z
11
+ date: 2014-08-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sass-rails
@@ -201,6 +201,7 @@ files:
201
201
  - fwt_bootstrap_rails.gemspec
202
202
  - lib/fwt_bootstrap_rails.rb
203
203
  - lib/fwt_bootstrap_rails/version.rb
204
+ - spec/builders/bootstrap_form_builder_spec.rb
204
205
  - spec/dummy/README.rdoc
205
206
  - spec/dummy/Rakefile
206
207
  - spec/dummy/app/assets/images/.keep
@@ -264,6 +265,7 @@ signing_key:
264
265
  specification_version: 4
265
266
  summary: Helpers for using Bootstrap 3 with Rails
266
267
  test_files:
268
+ - spec/builders/bootstrap_form_builder_spec.rb
267
269
  - spec/dummy/README.rdoc
268
270
  - spec/dummy/Rakefile
269
271
  - spec/dummy/app/assets/images/.keep