active_scaffold 3.7.3.1 → 3.7.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: 19423579470e1bb8a461f8e636f6f8fd78eaecfd9bcbd369308ae6e3e5579d9e
4
- data.tar.gz: cd1c919152e1548b5ec36713d4ed6e2bed68e9c442b7d4d8b2ec623446a4a876
3
+ metadata.gz: 9206609200e1c9330a6e04b1731300dad5fcba8a52c70ae26ef6ba6427da4c25
4
+ data.tar.gz: 0b501f82598b99ff587b1fa484d017a73f1fd018b5a26a7968c065d0152ae74b
5
5
  SHA512:
6
- metadata.gz: be7499f2ce41db308452898b8c09d701891659d8a13ef179cc5be022db3b15f1db1f28e25a6f7b160521bf50fa3b258688a255bffcc4247a0e51cc1fb62efaef
7
- data.tar.gz: ca811c9dc3c114ae1a5b09456524fa46ae0d59b147ca9a8c54ea0b170ba243f7f5b7ed7ce77397cf6744b47ad88ae7d30ce4618dd69e98d95a5e1503e592aabb
6
+ metadata.gz: '08c1c4a3b4dad7c731793ebecd4e238a36ee49e340964c8321a88b562fafbf0b12d7992501c5ffad8efa60820a40e80879f0c9e60715cc1da2e31a5c764781bc'
7
+ data.tar.gz: 310c5bf214800a98efd1d7af45b771608ce85cdf27db3df8437a0ea9cbabb243f2df8d8ee3603c81a9e43a76ba09dcaae20df26aa3a1b0df9bf0b18f2c244bab
data/CHANGELOG.rdoc CHANGED
@@ -1,3 +1,7 @@
1
+ = 3.7.4
2
+ - Support loading both jquery and jquery-ui externally
3
+ - Fix subquery in search with STI
4
+
1
5
  = 3.7.3.1
2
6
  - Fix search, view was broken when reset_form was added
3
7
 
@@ -3,18 +3,20 @@
3
3
  when :jquery
4
4
  require_asset "getprototypeof"
5
5
  require_asset "jquery.ba-throttle-debounce"
6
- if Jquery::Rails.const_defined? 'JQUERY_UI_VERSION'
7
- require_asset "jquery-ui"
8
- elsif Jquery.const_defined? 'Ui'
9
- jquery_ui_prefix = Jquery::Ui::Rails::VERSION < '5.0.0' ? 'jquery.ui.' : 'jquery-ui/'
10
- jquery_ui_widgets_prefix = Jquery::Ui::Rails::VERSION >= '6.0.0' ? 'widgets/' : ''
11
- require_asset "#{jquery_ui_prefix}core"
12
- require_asset "#{jquery_ui_prefix}effect"
13
- require_asset "#{jquery_ui_prefix}effects/effect-highlight" if Jquery::Ui::Rails::VERSION >= '6.0.0'
14
- require_asset "#{jquery_ui_prefix}#{jquery_ui_widgets_prefix}sortable"
15
- require_asset "#{jquery_ui_prefix}#{jquery_ui_widgets_prefix}draggable"
16
- require_asset "#{jquery_ui_prefix}#{jquery_ui_widgets_prefix}droppable"
17
- require_asset "#{jquery_ui_prefix}#{jquery_ui_widgets_prefix}datepicker"
6
+ if Object.const_defined?('Jquery')
7
+ if Jquery.const_defined?('Rails') && Jquery::Rails.const_defined?('JQUERY_UI_VERSION')
8
+ require_asset "jquery-ui"
9
+ elsif Jquery.const_defined? 'Ui'
10
+ jquery_ui_prefix = Jquery::Ui::Rails::VERSION < '5.0.0' ? 'jquery.ui.' : 'jquery-ui/'
11
+ jquery_ui_widgets_prefix = Jquery::Ui::Rails::VERSION >= '6.0.0' ? 'widgets/' : ''
12
+ require_asset "#{jquery_ui_prefix}core"
13
+ require_asset "#{jquery_ui_prefix}effect"
14
+ require_asset "#{jquery_ui_prefix}effects/effect-highlight" if Jquery::Ui::Rails::VERSION >= '6.0.0'
15
+ require_asset "#{jquery_ui_prefix}#{jquery_ui_widgets_prefix}sortable"
16
+ require_asset "#{jquery_ui_prefix}#{jquery_ui_widgets_prefix}draggable"
17
+ require_asset "#{jquery_ui_prefix}#{jquery_ui_widgets_prefix}droppable"
18
+ require_asset "#{jquery_ui_prefix}#{jquery_ui_widgets_prefix}datepicker"
19
+ end
18
20
  end
19
21
  if ActiveScaffold.jquery_ui_included?
20
22
  require_asset "jquery-ui-timepicker-addon"
@@ -1,10 +1,12 @@
1
- <% if Jquery::Rails.const_defined? 'JQUERY_UI_VERSION' %>
2
- <% require_asset "jquery-ui" %>
3
- <% elsif Jquery.const_defined? 'Ui' %>
4
- <% if Jquery::Ui::Rails::VERSION < '5.0.0' %>
5
- <% require_asset "jquery.ui.datepicker" %>
6
- <% else %>
7
- <% require_asset "jquery-ui/datepicker" %>
1
+ <% if Object.const_defined?('Jquery') %>
2
+ <% if Jquery.const_defined?('Rails') && Jquery::Rails.const_defined?('JQUERY_UI_VERSION') %>
3
+ <% require_asset "jquery-ui" %>
4
+ <% elsif Jquery.const_defined? 'Ui' %>
5
+ <% if Jquery::Ui::Rails::VERSION < '5.0.0' %>
6
+ <% require_asset "jquery.ui.datepicker" %>
7
+ <% else %>
8
+ <% require_asset "jquery-ui/datepicker" %>
9
+ <% end %>
8
10
  <% end %>
9
11
  <% end %>
10
12
  <% require_asset "jquery-ui-theme" if ActiveScaffold.jquery_ui_included? %>
@@ -146,7 +146,7 @@ module ActiveScaffold
146
146
  conditions.concat options[:conditions][1..-1] if options[:conditions]
147
147
  if column.association&.polymorphic?
148
148
  conditions[0] << " AND #{column.quoted_foreign_type} = ?"
149
- conditions << relation.name
149
+ conditions << relation.base_class.sti_name
150
150
  end
151
151
  conditions
152
152
  end
@@ -2,8 +2,8 @@ module ActiveScaffold
2
2
  module Version
3
3
  MAJOR = 3
4
4
  MINOR = 7
5
- PATCH = 3
6
- FIX = 1
5
+ PATCH = 4
6
+ FIX = nil
7
7
 
8
8
  STRING = [MAJOR, MINOR, PATCH, FIX].compact.join('.')
9
9
  end
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: 3.7.3.1
4
+ version: 3.7.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: 2024-05-08 00:00:00.000000000 Z
11
+ date: 2024-05-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails