filter_form 0.7.12 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7dc1544d27c25dda57fc4200dc6c60a61f2fe4bc
4
- data.tar.gz: 8b6a229ecc41f3c992cca64d5539eeb55954b411
3
+ metadata.gz: b926b0a351c9f2123caa31f855bd694e1d576cf5
4
+ data.tar.gz: 9df2378898485ab118798cdb0ada280ae3cb801e
5
5
  SHA512:
6
- metadata.gz: 165ff100d5de2ff86276401ec8b978d02288f51037850bd98cfb0917dc39322f89494144449f04f5ab864bdd5e3d83316f7a7aefc68f4497f96f1e89b7109bc6
7
- data.tar.gz: 016b6ad35e2f075d398a19b5e36cf3354cb152156bd4f38fa604ec8a98179dd4b10f67884131b69ce1d81d2af874290c86bb7ca85d9dd6003062d964f06fa18e
6
+ metadata.gz: c0cc369611f6e9eb2e402381e982218d3aac29d647edf7bb9fc3630aa87931d874bd944dd89ec95c090f9fec91278c2b4e28d4aefbb5f67ffae3d11a69b69491
7
+ data.tar.gz: 75d3adf19bb9f28bd17c77c217a73a22a210ccb4fb43c9a60f2a54318519164b27c6075378cd7afe9bb77e0d310663cdfb6dba99920f9776b103460301675919
@@ -1,13 +1,13 @@
1
1
  module FilterForm
2
2
  module InputOptions
3
- module String
4
- class Date < FilterForm::InputOptions::String::Base
3
+ module Date
4
+ class Base < FilterForm::InputOptions::String::Base
5
5
  DEFAULT_PREDICATE = :eq
6
6
 
7
7
  private
8
8
 
9
- def input_class
10
- 'filter_form_date'
9
+ def additional_options
10
+ { as: :date }
11
11
  end
12
12
  end
13
13
  end
@@ -0,0 +1,15 @@
1
+ module FilterForm
2
+ module InputOptions
3
+ module Datetime
4
+ class Base < FilterForm::InputOptions::String::Base
5
+ DEFAULT_PREDICATE = :eq
6
+
7
+ private
8
+
9
+ def additional_options
10
+ { as: :datetime }
11
+ end
12
+ end
13
+ end
14
+ end
15
+ end
@@ -1,19 +1,14 @@
1
1
  require 'filter_form/input_options/base'
2
2
  require 'filter_form/input_options/shared/with_associations'
3
-
4
3
  require 'filter_form/input_options/select/base'
5
-
6
4
  require 'filter_form/input_options/string/base'
7
- require 'filter_form/input_options/string/date'
8
-
9
5
  require 'filter_form/input_options/number/base'
10
6
  require 'filter_form/input_options/number/money'
11
-
12
7
  require 'filter_form/input_options/boolean/base'
13
-
14
8
  require 'filter_form/input_options/checkbox/base'
15
-
16
9
  require 'filter_form/input_options/radio_buttons/base'
10
+ require 'filter_form/input_options/date/base'
11
+ require 'filter_form/input_options/datetime/base'
17
12
 
18
13
  module FilterForm
19
14
  class InputOptionsBuilder
@@ -53,8 +48,6 @@ module FilterForm
53
48
  case _type
54
49
  when :text
55
50
  'string/base'
56
- when :datetime, :date
57
- 'string/date'
58
51
  when :integer, :float, :decimal
59
52
  'number/base'
60
53
  when :money
@@ -1,3 +1,3 @@
1
1
  module FilterForm
2
- VERSION = '0.7.12'
2
+ VERSION = '0.8.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: filter_form
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.12
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Evgeny Li
@@ -142,13 +142,14 @@ files:
142
142
  - lib/filter_form/input_options/base.rb
143
143
  - lib/filter_form/input_options/boolean/base.rb
144
144
  - lib/filter_form/input_options/checkbox/base.rb
145
+ - lib/filter_form/input_options/date/base.rb
146
+ - lib/filter_form/input_options/datetime/base.rb
145
147
  - lib/filter_form/input_options/number/base.rb
146
148
  - lib/filter_form/input_options/number/money.rb
147
149
  - lib/filter_form/input_options/radio_buttons/base.rb
148
150
  - lib/filter_form/input_options/select/base.rb
149
151
  - lib/filter_form/input_options/shared/with_associations.rb
150
152
  - lib/filter_form/input_options/string/base.rb
151
- - lib/filter_form/input_options/string/date.rb
152
153
  - lib/filter_form/input_options_builder.rb
153
154
  - lib/filter_form/money_converter.rb
154
155
  - lib/filter_form/simple_form/form_builder.rb