active_scaffold 3.6.19 → 3.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (96) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.rdoc +30 -0
  3. data/README.md +27 -16
  4. data/app/assets/javascripts/jquery/active_scaffold.js +38 -6
  5. data/app/assets/javascripts/jquery/active_scaffold_chosen.js +6 -5
  6. data/app/assets/javascripts/jquery/tiny_mce_bridge.js +18 -4
  7. data/app/assets/stylesheets/active_scaffold_layout.css +12 -1
  8. data/app/views/active_scaffold_overrides/_base_form.html.erb +5 -1
  9. data/app/views/active_scaffold_overrides/_field_search.html.erb +1 -0
  10. data/app/views/active_scaffold_overrides/_render_field.js.erb +19 -11
  11. data/config/locales/ja.yml +59 -59
  12. data/lib/active_scaffold/actions/common_search.rb +2 -2
  13. data/lib/active_scaffold/actions/core.rb +30 -10
  14. data/lib/active_scaffold/actions/field_search.rb +9 -6
  15. data/lib/active_scaffold/actions/nested.rb +7 -7
  16. data/lib/active_scaffold/attribute_params.rb +19 -57
  17. data/lib/active_scaffold/bridges/active_storage/active_storage_helpers.rb +0 -3
  18. data/lib/active_scaffold/bridges/active_storage/list_ui.rb +1 -1
  19. data/lib/active_scaffold/bridges/active_storage.rb +3 -0
  20. data/lib/active_scaffold/bridges/bitfields/bitfields_bridge.rb +2 -2
  21. data/lib/active_scaffold/bridges/date_picker/helper.rb +4 -4
  22. data/lib/active_scaffold/bridges/paper_trail/actions.rb +4 -1
  23. data/lib/active_scaffold/bridges/record_select/helpers.rb +2 -2
  24. data/lib/active_scaffold/bridges/tiny_mce.rb +1 -1
  25. data/lib/active_scaffold/bridges/usa_state_select/usa_state_select_helper.rb +1 -6
  26. data/lib/active_scaffold/config/core.rb +1 -1
  27. data/lib/active_scaffold/config/field_search.rb +9 -1
  28. data/lib/active_scaffold/config/form.rb +9 -1
  29. data/lib/active_scaffold/core.rb +2 -8
  30. data/lib/active_scaffold/data_structures/action_columns.rb +0 -25
  31. data/lib/active_scaffold/data_structures/action_links.rb +1 -1
  32. data/lib/active_scaffold/data_structures/association/abstract.rb +8 -0
  33. data/lib/active_scaffold/data_structures/association/active_mongoid.rb +8 -0
  34. data/lib/active_scaffold/data_structures/association/active_record.rb +1 -13
  35. data/lib/active_scaffold/data_structures/association/mongoid.rb +21 -8
  36. data/lib/active_scaffold/data_structures/column.rb +31 -5
  37. data/lib/active_scaffold/data_structures/columns.rb +12 -12
  38. data/lib/active_scaffold/data_structures/nested_info.rb +12 -0
  39. data/lib/active_scaffold/data_structures/sorting.rb +1 -1
  40. data/lib/active_scaffold/engine.rb +0 -1
  41. data/lib/active_scaffold/extensions/action_view_rendering.rb +13 -5
  42. data/lib/active_scaffold/extensions/cow_proxy.rb +1 -1
  43. data/lib/active_scaffold/extensions/unsaved_record.rb +9 -3
  44. data/lib/active_scaffold/finder.rb +6 -2
  45. data/lib/active_scaffold/helpers/action_link_helpers.rb +1 -1
  46. data/lib/active_scaffold/helpers/form_column_helpers.rb +48 -22
  47. data/lib/active_scaffold/helpers/list_column_helpers.rb +3 -2
  48. data/lib/active_scaffold/helpers/search_column_helpers.rb +8 -2
  49. data/lib/active_scaffold/helpers/view_helpers.rb +1 -1
  50. data/lib/active_scaffold/registry.rb +10 -15
  51. data/lib/active_scaffold/tableless.rb +10 -79
  52. data/lib/active_scaffold/version.rb +2 -2
  53. data/lib/active_scaffold.rb +0 -7
  54. data/lib/generators/active_scaffold/install_generator.rb +2 -2
  55. data/test/bridges/bridge_test.rb +1 -1
  56. data/test/bridges/paperclip_test.rb +16 -13
  57. data/test/bridges/tiny_mce_test.rb +1 -1
  58. data/test/config/base_test.rb +1 -1
  59. data/test/config/core_test.rb +1 -1
  60. data/test/config/create_test.rb +1 -1
  61. data/test/config/delete_test.rb +1 -1
  62. data/test/config/field_search_test.rb +1 -1
  63. data/test/config/list_test.rb +1 -1
  64. data/test/config/nested_test.rb +1 -1
  65. data/test/config/search_test.rb +1 -1
  66. data/test/config/show_test.rb +1 -1
  67. data/test/config/subform_test.rb +1 -1
  68. data/test/config/update_test.rb +1 -1
  69. data/test/data_structures/action_columns_test.rb +1 -1
  70. data/test/data_structures/action_link_test.rb +1 -1
  71. data/test/data_structures/action_links_test.rb +1 -1
  72. data/test/data_structures/actions_test.rb +1 -1
  73. data/test/data_structures/association_column_test.rb +1 -1
  74. data/test/data_structures/column_test.rb +1 -1
  75. data/test/data_structures/columns_test.rb +1 -1
  76. data/test/data_structures/set_test.rb +1 -1
  77. data/test/data_structures/sorting_test.rb +1 -1
  78. data/test/data_structures/standard_column_test.rb +1 -1
  79. data/test/data_structures/validation_reflection_test.rb +1 -1
  80. data/test/data_structures/virtual_column_test.rb +1 -1
  81. data/test/extensions/active_record_test.rb +1 -1
  82. data/test/helpers/pagination_helpers_test.rb +1 -1
  83. data/test/misc/active_record_permissions_test.rb +1 -1
  84. data/test/misc/attribute_params_test.rb +1 -1
  85. data/test/misc/calculation_test.rb +1 -1
  86. data/test/misc/configurable_test.rb +1 -1
  87. data/test/misc/constraints_test.rb +1 -1
  88. data/test/misc/convert_numbers_format_test.rb +1 -1
  89. data/test/misc/finder_test.rb +1 -1
  90. data/test/misc/lang_test.rb +1 -1
  91. data/test/misc/parse_datetime_test.rb +1 -1
  92. data/test/misc/tableless_test.rb +1 -1
  93. data/test/test_helper.rb +4 -4
  94. metadata +6 -14
  95. data/lib/active_scaffold/delayed_setup.rb +0 -41
  96. data/lib/active_scaffold/extensions/left_outer_joins.rb +0 -43
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.6.19
4
+ version: 3.7.0
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: 2023-06-02 00:00:00.000000000 Z
11
+ date: 2024-01-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -16,20 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 4.2.0
20
- - - "<"
21
- - !ruby/object:Gem::Version
22
- version: '6.2'
19
+ version: 5.2.0
23
20
  type: :runtime
24
21
  prerelease: false
25
22
  version_requirements: !ruby/object:Gem::Requirement
26
23
  requirements:
27
24
  - - ">="
28
25
  - !ruby/object:Gem::Version
29
- version: 4.2.0
30
- - - "<"
31
- - !ruby/object:Gem::Version
32
- version: '6.2'
26
+ version: 5.2.0
33
27
  - !ruby/object:Gem::Dependency
34
28
  name: cow_proxy
35
29
  requirement: !ruby/object:Gem::Requirement
@@ -309,7 +303,6 @@ files:
309
303
  - lib/active_scaffold/data_structures/nested_info.rb
310
304
  - lib/active_scaffold/data_structures/set.rb
311
305
  - lib/active_scaffold/data_structures/sorting.rb
312
- - lib/active_scaffold/delayed_setup.rb
313
306
  - lib/active_scaffold/engine.rb
314
307
  - lib/active_scaffold/extensions/action_controller_rendering.rb
315
308
  - lib/active_scaffold/extensions/action_controller_rescueing.rb
@@ -317,7 +310,6 @@ files:
317
310
  - lib/active_scaffold/extensions/connection_adapter.rb
318
311
  - lib/active_scaffold/extensions/cow_proxy.rb
319
312
  - lib/active_scaffold/extensions/ice_nine.rb
320
- - lib/active_scaffold/extensions/left_outer_joins.rb
321
313
  - lib/active_scaffold/extensions/localize.rb
322
314
  - lib/active_scaffold/extensions/name_option_for_datetime.rb
323
315
  - lib/active_scaffold/extensions/paginator_extensions.rb
@@ -470,14 +462,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
470
462
  requirements:
471
463
  - - ">="
472
464
  - !ruby/object:Gem::Version
473
- version: '2.3'
465
+ version: '2.5'
474
466
  required_rubygems_version: !ruby/object:Gem::Requirement
475
467
  requirements:
476
468
  - - ">="
477
469
  - !ruby/object:Gem::Version
478
470
  version: '0'
479
471
  requirements: []
480
- rubygems_version: 3.0.9
472
+ rubygems_version: 3.2.3
481
473
  signing_key:
482
474
  specification_version: 4
483
475
  summary: Rails 4.x and 5.x versions of ActiveScaffold supporting prototype and jquery
@@ -1,41 +0,0 @@
1
- module ActiveScaffold
2
- module DelayedSetup
3
- def self.included(base)
4
- base.extend ClassMethods
5
- end
6
-
7
- def process(*)
8
- self.class.config_active_scaffold_delayed
9
- super
10
- end
11
-
12
- module ClassMethods
13
- def active_scaffold(model_id = nil, &block)
14
- @delayed_monitor ||= Monitor.new
15
- @active_scaffold_delayed = proc do
16
- begin
17
- @_prefixes = nil # clean prefixes in case is already cached, so our local_prefixes override is picked up
18
- super(model_id, &block)
19
- @active_scaffold_delayed = @delayed_monitor = nil # after configuring, no need to keep proc or monitor
20
- rescue StandardError
21
- # clear config variable if failed, so next request tries again
22
- @active_scaffold_config = nil
23
- raise
24
- end
25
- end
26
- end
27
-
28
- def config_active_scaffold_delayed
29
- @delayed_monitor&.synchronize do
30
- # if called in same thread while running config, do nothing
31
- @active_scaffold_delayed&.call unless @active_scaffold_config
32
- end
33
- end
34
-
35
- def active_scaffold_config
36
- config_active_scaffold_delayed
37
- super
38
- end
39
- end
40
- end
41
- end
@@ -1,43 +0,0 @@
1
- if Rails.version < '5.0.0'
2
- module ActiveScaffold
3
- module OuterJoins
4
- extend ActiveSupport::Concern
5
-
6
- def left_outer_joins_values
7
- @values[:left_outer_joins] || []
8
- end
9
-
10
- def left_outer_joins_values=(values)
11
- raise ImmutableRelation if @loaded
12
- @values[:left_outer_joins] = values
13
- end
14
-
15
- def left_outer_joins(*args)
16
- check_if_method_has_arguments!('left_outer_joins', args)
17
- spawn.left_outer_joins!(*args.compact.flatten)
18
- end
19
- alias left_joins left_outer_joins
20
-
21
- def left_outer_joins!(*args)
22
- self.joins_values += [''] # HACK: for using left_outer_joins in update_all/delete_all
23
- self.left_outer_joins_values += args
24
- self
25
- end
26
- alias left_joins! left_outer_joins!
27
-
28
- def build_arel
29
- if left_outer_joins_values.empty?
30
- super
31
- else
32
- relation = except(:left_outer_joins)
33
- relation.joins! ActiveRecord::Associations::JoinDependency.new(@klass, left_outer_joins_values, [])
34
- relation.build_arel
35
- end
36
- end
37
- end
38
- end
39
- ActiveRecord::Relation.send :include, ActiveScaffold::OuterJoins
40
- module ActiveRecord::Querying
41
- delegate :left_outer_joins, :left_joins, :to => :all
42
- end
43
- end