active_scaffold 4.0.5 → 4.0.8

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
  SHA256:
3
- metadata.gz: 3c08117896f07d156bf39c05d52f76211e1294354e710d62eb7d43d8ff191515
4
- data.tar.gz: 988856fbbbb7f4f4e052d33784646e0c371a4df89ab422205ae570879e5163fe
3
+ metadata.gz: c711dd4f7f557cd581c2e1d4b15d3e1602576f8714e111bedac9860437620f96
4
+ data.tar.gz: a62bc3a1fbd7030b5cddbbf69751b548d9de9752c995e7789666ff1864bf57d3
5
5
  SHA512:
6
- metadata.gz: ce177560652338e80e6135c6bc878a13800568115281e61f5a9d378cd1dd5542529e30230c8586c6a7e0d096be8ddb91e85f916d8d7e1b12643180f66a84cd66
7
- data.tar.gz: 3abe0164c95eefaded8c9c9c715cb84d98762477a57a78084a7129817cc9d0740c86addacabe900ac810723e9058d8b9198ba8697d4a855a6de763254268a988
6
+ metadata.gz: 31de6f1bbc6be46f8b1d480784588cfdf3ea526a54cfb6f45325b6a04fa77091939856600efba0d028519c2b622c90534a90aa82f2d74170b3886b156b6a1b9d
7
+ data.tar.gz: 4568a9231ec6bda26f8d8eb64b5d4e3f2793a1f9bebe49eb0d387f59ce955e4d3e4e630a840f5acde6c7caeaf212048402ced3051c3c19a1082f8156aa053b87
data/CHANGELOG.rdoc CHANGED
@@ -1,3 +1,12 @@
1
+ = 4.0.8
2
+ - Fix date_picker with format option
3
+
4
+ = 4.0.7
5
+ - Fix tableless in rails 7.2
6
+
7
+ = 4.0.6
8
+ - Fix :select form_ui on column using SQL in sort_by, such as 'table.user_id IS NULL'
9
+
1
10
  = 4.0.5
2
11
  - Fix if ActiveScaffold::Actions::Nested::ChildMethods is included manually after AS config block
3
12
 
@@ -30,6 +39,9 @@
30
39
  - Thread safety enabled by default, can't be disabled, deprecate ActiveScaffold.threadsafe!
31
40
  - Support subgroups on field search
32
41
 
42
+ = 3.7.13
43
+ - Fix :select form_ui on column using SQL in sort_by, such as 'table.user_id IS NULL'
44
+
33
45
  = 3.7.12
34
46
  - Fix using update_columns in field search with search UI submitting a hash, such as date fields
35
47
  - Support disabling update_columsns on field_search
@@ -176,7 +176,7 @@ module ActiveScaffold::Bridges
176
176
  options = active_scaffold_input_text_options(options.merge(ui_options))
177
177
  options[:class] << " #{column.form_ui}"
178
178
 
179
- format = datepicker_format(ui_options, column.form_ui)
179
+ format = datepicker_format(options, column.form_ui)
180
180
  conversion = column.form_ui == :date_picker ? :to_date : :to_time
181
181
  value = controller.class.condition_value_for_datetime(column, record.send(column.name), conversion, ui_method: :form_ui, ui_options: ui_options)
182
182
  options[:data] = datepicker_format_options(column, format).reverse_merge!(options[:data] || {})
@@ -42,7 +42,7 @@ module ActiveScaffold
42
42
  if column&.sort && column.sort&.dig(:sql)
43
43
  # with threasafe enabled, column.sort[:sql] returns proxied strings and
44
44
  # regexp capture won't work, which rails uses internally, so to_s is needed
45
- relation = relation.order(Array(column.sort[:sql]).map(&:to_s))
45
+ relation = relation.order(Array(column.sort[:sql]).map { |sql| Arel.sql(sql.to_s) })
46
46
  end
47
47
  relation = yield(relation) if block_given?
48
48
  relation.to_a
@@ -14,6 +14,10 @@ class ActiveScaffold::Tableless < ActiveRecord::Base # rubocop:disable Rails/App
14
14
  def data_sources
15
15
  klass ? [klass.table_name] : []
16
16
  end
17
+
18
+ def quote_column_name(column_name)
19
+ column_name.to_s
20
+ end
17
21
  end
18
22
 
19
23
  class Column < ActiveRecord::ConnectionAdapters::Column
@@ -2,7 +2,7 @@ module ActiveScaffold
2
2
  module Version
3
3
  MAJOR = 4
4
4
  MINOR = 0
5
- PATCH = 5
5
+ PATCH = 8
6
6
  FIX = nil
7
7
 
8
8
  STRING = [MAJOR, MINOR, PATCH, FIX].compact.join('.')
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_scaffold
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.5
4
+ version: 4.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Many, see README
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-04-30 00:00:00.000000000 Z
11
+ date: 2025-05-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails