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.
- checksums.yaml +4 -4
- data/CHANGELOG.rdoc +30 -0
- data/README.md +27 -16
- data/app/assets/javascripts/jquery/active_scaffold.js +38 -6
- data/app/assets/javascripts/jquery/active_scaffold_chosen.js +6 -5
- data/app/assets/javascripts/jquery/tiny_mce_bridge.js +18 -4
- data/app/assets/stylesheets/active_scaffold_layout.css +12 -1
- data/app/views/active_scaffold_overrides/_base_form.html.erb +5 -1
- data/app/views/active_scaffold_overrides/_field_search.html.erb +1 -0
- data/app/views/active_scaffold_overrides/_render_field.js.erb +19 -11
- data/config/locales/ja.yml +59 -59
- data/lib/active_scaffold/actions/common_search.rb +2 -2
- data/lib/active_scaffold/actions/core.rb +30 -10
- data/lib/active_scaffold/actions/field_search.rb +9 -6
- data/lib/active_scaffold/actions/nested.rb +7 -7
- data/lib/active_scaffold/attribute_params.rb +19 -57
- data/lib/active_scaffold/bridges/active_storage/active_storage_helpers.rb +0 -3
- data/lib/active_scaffold/bridges/active_storage/list_ui.rb +1 -1
- data/lib/active_scaffold/bridges/active_storage.rb +3 -0
- data/lib/active_scaffold/bridges/bitfields/bitfields_bridge.rb +2 -2
- data/lib/active_scaffold/bridges/date_picker/helper.rb +4 -4
- data/lib/active_scaffold/bridges/paper_trail/actions.rb +4 -1
- data/lib/active_scaffold/bridges/record_select/helpers.rb +2 -2
- data/lib/active_scaffold/bridges/tiny_mce.rb +1 -1
- data/lib/active_scaffold/bridges/usa_state_select/usa_state_select_helper.rb +1 -6
- data/lib/active_scaffold/config/core.rb +1 -1
- data/lib/active_scaffold/config/field_search.rb +9 -1
- data/lib/active_scaffold/config/form.rb +9 -1
- data/lib/active_scaffold/core.rb +2 -8
- data/lib/active_scaffold/data_structures/action_columns.rb +0 -25
- data/lib/active_scaffold/data_structures/action_links.rb +1 -1
- data/lib/active_scaffold/data_structures/association/abstract.rb +8 -0
- data/lib/active_scaffold/data_structures/association/active_mongoid.rb +8 -0
- data/lib/active_scaffold/data_structures/association/active_record.rb +1 -13
- data/lib/active_scaffold/data_structures/association/mongoid.rb +21 -8
- data/lib/active_scaffold/data_structures/column.rb +31 -5
- data/lib/active_scaffold/data_structures/columns.rb +12 -12
- data/lib/active_scaffold/data_structures/nested_info.rb +12 -0
- data/lib/active_scaffold/data_structures/sorting.rb +1 -1
- data/lib/active_scaffold/engine.rb +0 -1
- data/lib/active_scaffold/extensions/action_view_rendering.rb +13 -5
- data/lib/active_scaffold/extensions/cow_proxy.rb +1 -1
- data/lib/active_scaffold/extensions/unsaved_record.rb +9 -3
- data/lib/active_scaffold/finder.rb +6 -2
- data/lib/active_scaffold/helpers/action_link_helpers.rb +1 -1
- data/lib/active_scaffold/helpers/form_column_helpers.rb +48 -22
- data/lib/active_scaffold/helpers/list_column_helpers.rb +3 -2
- data/lib/active_scaffold/helpers/search_column_helpers.rb +8 -2
- data/lib/active_scaffold/helpers/view_helpers.rb +1 -1
- data/lib/active_scaffold/registry.rb +10 -15
- data/lib/active_scaffold/tableless.rb +10 -79
- data/lib/active_scaffold/version.rb +2 -2
- data/lib/active_scaffold.rb +0 -7
- data/lib/generators/active_scaffold/install_generator.rb +2 -2
- data/test/bridges/bridge_test.rb +1 -1
- data/test/bridges/paperclip_test.rb +16 -13
- data/test/bridges/tiny_mce_test.rb +1 -1
- data/test/config/base_test.rb +1 -1
- data/test/config/core_test.rb +1 -1
- data/test/config/create_test.rb +1 -1
- data/test/config/delete_test.rb +1 -1
- data/test/config/field_search_test.rb +1 -1
- data/test/config/list_test.rb +1 -1
- data/test/config/nested_test.rb +1 -1
- data/test/config/search_test.rb +1 -1
- data/test/config/show_test.rb +1 -1
- data/test/config/subform_test.rb +1 -1
- data/test/config/update_test.rb +1 -1
- data/test/data_structures/action_columns_test.rb +1 -1
- data/test/data_structures/action_link_test.rb +1 -1
- data/test/data_structures/action_links_test.rb +1 -1
- data/test/data_structures/actions_test.rb +1 -1
- data/test/data_structures/association_column_test.rb +1 -1
- data/test/data_structures/column_test.rb +1 -1
- data/test/data_structures/columns_test.rb +1 -1
- data/test/data_structures/set_test.rb +1 -1
- data/test/data_structures/sorting_test.rb +1 -1
- data/test/data_structures/standard_column_test.rb +1 -1
- data/test/data_structures/validation_reflection_test.rb +1 -1
- data/test/data_structures/virtual_column_test.rb +1 -1
- data/test/extensions/active_record_test.rb +1 -1
- data/test/helpers/pagination_helpers_test.rb +1 -1
- data/test/misc/active_record_permissions_test.rb +1 -1
- data/test/misc/attribute_params_test.rb +1 -1
- data/test/misc/calculation_test.rb +1 -1
- data/test/misc/configurable_test.rb +1 -1
- data/test/misc/constraints_test.rb +1 -1
- data/test/misc/convert_numbers_format_test.rb +1 -1
- data/test/misc/finder_test.rb +1 -1
- data/test/misc/lang_test.rb +1 -1
- data/test/misc/parse_datetime_test.rb +1 -1
- data/test/misc/tableless_test.rb +1 -1
- data/test/test_helper.rb +4 -4
- metadata +6 -14
- data/lib/active_scaffold/delayed_setup.rb +0 -41
- 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.
|
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:
|
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:
|
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:
|
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.
|
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.
|
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
|