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 +4 -4
- data/README.md +1 -1
- data/app/models/effective/form_inputs/integer_field.rb +4 -1
- data/lib/effective_bootstrap/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9fbd0c40bb4feaa8525e79415aae490227aa0a0b420c0e665866ced743ae86ef
|
4
|
+
data.tar.gz: 11f4d4d9b2baf50cc68bbe057c75d3b0dd5af2ccd8622b4ea089525ba5cb7c5b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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
|
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.
|
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-
|
11
|
+
date: 2019-07-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|