active_scaffold 4.1.3 → 4.1.4

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: d4c70ae052bcb8ed18108dbf350f0cbe833e23663d5bb370e1aa887af6145217
4
- data.tar.gz: 387bee72fa30b80a9dde7e5e175c49a9dccf7fffbdaca8d9bcfe60f40629403f
3
+ metadata.gz: 7779c25b68085b6f9211742c807f90113cdd42c9397e3c60fea72e27ec0eb1ac
4
+ data.tar.gz: 0730c726da51cc31d08fc8081022e249224feddcca239d09d1a663da9a49fa0a
5
5
  SHA512:
6
- metadata.gz: c9d9ed8c83b97ad34b67428671b0f95b00bdf24e7fe1c86ef5d1e531258be150c735df7f0b9d735d58bb71628d4d57bd69877d5b39a7bdc8d765f056747d4030
7
- data.tar.gz: 5f3b69d2f95c8c409ce31814cd41b8ff23b9ef8154a3eddb45f9e99bc3a5349d60b5c4fd201a63c2066e32af999222e9dff8580f39fd05f7f1b52952dd2d79f1
6
+ metadata.gz: 205afed622c3b48938adc5baa75b8ca1e016ce4a959f5a60f539918f502d172f81d0c39b38bc4ea900ef37e49f7e5b6cb0bbb1c2d10122b3b72ec87a40075521
7
+ data.tar.gz: 21f01f191d84180b1b15ae54a3f4e9091fa9c088670105e6484a9ca641880c901e0aa803e4d0e38ec7d8a464a134a8826310a942981fd3b8447c094a128b8ef4
data/CHANGELOG.rdoc CHANGED
@@ -1,3 +1,6 @@
1
+ - Fix dirty attributes on refresh_field action, record is built on unsaved instance copying attributes, but it reports only changed attributes from the form now
2
+ - Fix incompatibility with Rails renderable objects (ViewComponent, Turbo Streams)
3
+
1
4
  = 4.1.3
2
5
  - Columns using bitfields are not treated as number columns (e.g. don't get numeric class in list)
3
6
  - Fix loading tinymce when the form is loaded on page load
@@ -190,6 +190,7 @@ module ActiveScaffold::Actions
190
190
  def copy_attributes(orig, dst = nil)
191
191
  dst ||= orig.class.new
192
192
  orig.attributes.each { |attr, value| dst.send :write_attribute, attr, value }
193
+ dst.changes_applied
193
194
  dst
194
195
  end
195
196
 
@@ -9,9 +9,9 @@ module ActiveScaffold
9
9
  model.bitfields.each do |column, options|
10
10
  columns[column].number = false
11
11
  columns << options.keys
12
- options.each_key.with_index(1) do |column, i|
13
- columns[column].form_ui = :checkbox
14
- columns[column].weight = 1000 + i
12
+ options.each_key.with_index(1) do |bit_column, i|
13
+ columns[bit_column].form_ui = :checkbox
14
+ columns[bit_column].weight = 1000 + i
15
15
  end
16
16
  end
17
17
  end
@@ -36,6 +36,8 @@ module ActiveScaffold # :nodoc:
36
36
  # options[:xhr] force to load embedded scaffold with AJAX even when render_component gem is installed.
37
37
  #
38
38
  def render(*args, &)
39
+ return args.first.render_in(self) if args.one? && args.first.respond_to?(:render_in)
40
+
39
41
  if args.first.is_a?(Hash) && args.first[:active_scaffold]
40
42
  render_embedded args.first
41
43
  elsif args.first == :super
@@ -182,6 +184,8 @@ module ActionView
182
184
  # override the render method to use our @lookup_context instead of the
183
185
  # memoized @_lookup_context
184
186
  def render(options = {}, locals = {}, &block)
187
+ return options.render_in(self) if options.respond_to?(:render_in)
188
+
185
189
  case options
186
190
  when Hash
187
191
  in_rendering_context(options) do |_|
@@ -2,7 +2,7 @@ module ActiveScaffold
2
2
  module Version
3
3
  MAJOR = 4
4
4
  MINOR = 1
5
- PATCH = 3
5
+ PATCH = 4
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.1.3
4
+ version: 4.1.4
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-11-14 00:00:00.000000000 Z
11
+ date: 2025-12-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dartsass-sprockets