effective_bootstrap 0.6.0 → 0.6.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
  SHA256:
3
- metadata.gz: 39dd6fac44cee070229c8ec577dac717f1424a2f91f3d6fc330dcd7df4a3c42e
4
- data.tar.gz: db53ef783df477e581bcab7e259ad83ddb757046e56adefa558b5c68593ef285
3
+ metadata.gz: 9fbd0c40bb4feaa8525e79415aae490227aa0a0b420c0e665866ced743ae86ef
4
+ data.tar.gz: 11f4d4d9b2baf50cc68bbe057c75d3b0dd5af2ccd8622b4ea089525ba5cb7c5b
5
5
  SHA512:
6
- metadata.gz: ded33dac28b7d3562b0065587a11054252f7ac74ac10322c32549f1f40031abb32e27bcb2f6161bca5b2d725da29e17f6ea45459d49f6978835cd4f1f4c4e9d4
7
- data.tar.gz: 7d0ef4ddeb4da9c2489dfe5d32db4ef42028982f3f6037c75b5495412e3eeaddce0b5833f8d1f0b959e85ec505c6fa28bbea4ae68a5952cd1c22c80ffedb3d36
6
+ metadata.gz: 9d1c03adef165d45312f391bca77a13ef41df28cc881b07c13031f75fa031025a883fed242c6a2873217c6f110792ea07712311cf6d88be3c19e5c63c8a40c49
7
+ data.tar.gz: e79d5bb415450b7196b0af2223f26fd7a94d8f67292008b0b750af59eccab601ea6430bc83cc097abdfeb9b0bcbfec7185b6ccf6645699fb5b4d6c67fbe952ae
data/README.md CHANGED
@@ -515,7 +515,7 @@ Provide the `ajax_url: ` method to use AJAX remote data source.
515
515
  In your form:
516
516
 
517
517
  ```ruby
518
- = f.input :user_id, User.all, ajax_url: users_select2_ajax_index_path
518
+ = f.select :user_id, User.all, ajax_url: users_select2_ajax_index_path
519
519
  ```
520
520
 
521
521
  In your `routes.rb`:
@@ -3,13 +3,16 @@ module Effective
3
3
  class IntegerField < Effective::FormInput
4
4
 
5
5
  def build_input(&block)
6
- @builder.super_text_field(name, options[:input])
6
+ @builder.super_text_field(name, options[:input].merge(value: value_to_i))
7
7
  end
8
8
 
9
9
  def input_html_options
10
10
  { class: 'form-control effective_integer', autocomplete: 'off' }
11
11
  end
12
12
 
13
+ def value_to_i
14
+ value.to_i if value
15
+ end
13
16
  end
14
17
  end
15
18
  end
@@ -1,3 +1,3 @@
1
1
  module EffectiveBootstrap
2
- VERSION = '0.6.0'.freeze
2
+ VERSION = '0.6.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_bootstrap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-06-26 00:00:00.000000000 Z
11
+ date: 2019-07-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails