convenient_service 0.25.0 → 0.27.0
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 +4 -4
- data/lib/convenient_service/aliases.rb +0 -11
- data/lib/convenient_service/common/plugins/assigns_attributes_in_constructor/using_active_model_attribute_assignment/concern.rb +1 -1
- data/lib/convenient_service/common/plugins/assigns_attributes_in_constructor/using_dry_initializer/concern.rb +1 -1
- data/lib/convenient_service/common/plugins/caches_constructor_arguments/concern.rb +1 -1
- data/lib/convenient_service/common/plugins/can_be_copied/concern.rb +1 -1
- data/lib/convenient_service/common/plugins/can_have_callbacks/concern.rb +1 -1
- data/lib/convenient_service/common/plugins/can_have_callbacks/entities/type/concern.rb +1 -1
- data/lib/convenient_service/common/plugins/can_have_not_passed_arguments/concern.rb +1 -1
- data/lib/convenient_service/common/plugins/can_utilize_finite_loop/concern.rb +1 -1
- data/lib/convenient_service/common/plugins/has_attributes/using_active_model_attributes/concern.rb +1 -1
- data/lib/convenient_service/common/plugins/has_constructor/concern.rb +1 -1
- data/lib/convenient_service/common/plugins/has_constructor_without_initialize/concern.rb +1 -1
- data/lib/convenient_service/common/plugins/has_instance_proxy/concern.rb +1 -1
- data/lib/convenient_service/common/plugins/has_internals/concern.rb +1 -1
- data/lib/convenient_service/common/plugins/has_internals/entities/internals/concern.rb +1 -1
- data/lib/convenient_service/common/plugins/has_internals/entities/internals/plugins/has_cache/concern.rb +1 -1
- data/lib/convenient_service/common/plugins/has_j_send_result_duck_short_syntax/concern.rb +1 -1
- data/lib/convenient_service/common/plugins/has_memoization/using_memo_wise/concern.rb +1 -1
- data/lib/convenient_service/common/plugins/tries_to_convert_result_duck_to_result/middleware.rb +54 -0
- data/lib/convenient_service/common/plugins/tries_to_convert_result_duck_to_result.rb +8 -0
- data/lib/convenient_service/common/plugins.rb +1 -0
- data/lib/convenient_service/config/entities/option.rb +11 -9
- data/lib/convenient_service/config/entities/option_collection.rb +8 -4
- data/lib/convenient_service/core/aliases.rb +50 -0
- data/lib/convenient_service/core/entities/config/commands/build_entity_from_config_option.rb +63 -0
- data/lib/convenient_service/core/entities/config/commands.rb +1 -0
- data/lib/convenient_service/core/entities/config/entities/concerns/usual.rb +50 -0
- data/lib/convenient_service/core/entities/config/entities/concerns.rb +2 -0
- data/lib/convenient_service/core/entities/config/entities/method_middlewares/entities/middlewares/base/concern/class_methods.rb +9 -0
- data/lib/convenient_service/feature/plugins/can_have_entries/concern.rb +1 -1
- data/lib/convenient_service/feature/plugins/can_have_rspec_stubbed_entries/concern.rb +1 -1
- data/lib/convenient_service/feature/plugins/can_have_stubbed_entries/concern.rb +1 -1
- data/lib/convenient_service/feature/plugins/has_amazing_print_inspect/concern.rb +1 -1
- data/lib/convenient_service/feature/plugins/has_awesome_print_inspect/concern.rb +1 -1
- data/lib/convenient_service/feature/plugins/has_inspect/concern.rb +1 -1
- data/lib/convenient_service/service/configs/standard/v1.rb +2 -0
- data/lib/convenient_service/service/configs/standard.rb +21 -9
- data/lib/convenient_service/service/plugins/can_be_called/concern.rb +1 -1
- data/lib/convenient_service/service/plugins/can_have_connected_steps/concern.rb +1 -1
- data/lib/convenient_service/service/plugins/can_have_fallbacks/concern.rb +1 -1
- data/lib/convenient_service/service/plugins/can_have_handled_exceptions/concern.rb +1 -1
- data/lib/convenient_service/service/plugins/can_have_inline_services/concern.rb +1 -1
- data/lib/convenient_service/service/plugins/can_have_inline_services/entities/proxy.rb +5 -0
- data/lib/convenient_service/service/plugins/can_have_recalculations/concern.rb +1 -1
- data/lib/convenient_service/service/plugins/can_have_rspec_stubbed_results/concern.rb +1 -1
- data/lib/convenient_service/service/plugins/can_have_sequential_steps/concern.rb +1 -1
- data/lib/convenient_service/service/plugins/can_have_service_aware_enumerables/concern.rb +1 -10
- data/lib/convenient_service/service/plugins/can_have_steps/concern.rb +1 -1
- data/lib/convenient_service/service/plugins/can_have_steps/entities/method/concern.rb +1 -1
- data/lib/convenient_service/service/plugins/can_have_steps/entities/service/concern.rb +1 -1
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/commands/cast_params.rb +0 -8
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/commands/extract_params.rb +1 -2
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/concern/instance_methods.rb +0 -11
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/concern.rb +1 -1
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_be_evaluated/concern.rb +1 -1
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_be_evaluated/middleware.rb +43 -0
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_be_evaluated.rb +1 -0
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_be_method_step/concern.rb +1 -1
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_be_service_step/concern.rb +1 -1
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_be_strict/concern.rb +35 -0
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_be_strict/middleware.rb +40 -0
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_be_strict.rb +9 -0
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_be_used_in_service_aware_enumerables/concern.rb +1 -1
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_have_fallbacks/concern.rb +1 -1
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/has_amazing_print_inspect/concern.rb +1 -1
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/has_awesome_print_inspect/concern.rb +1 -1
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/has_inspect/concern.rb +1 -1
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/has_result/concern.rb +1 -1
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/has_result/middleware.rb +0 -2
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins.rb +1 -0
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/structs/params.rb +2 -2
- data/lib/convenient_service/service/plugins/can_have_stubbed_results/concern.rb +1 -1
- data/lib/convenient_service/service/plugins/can_not_be_inherited/concern.rb +1 -1
- data/lib/convenient_service/service/plugins/has_amazing_print_inspect/concern.rb +1 -1
- data/lib/convenient_service/service/plugins/has_awesome_print_inspect/concern.rb +1 -1
- data/lib/convenient_service/service/plugins/has_inspect/concern.rb +1 -1
- data/lib/convenient_service/service/plugins/has_j_send_result/concern.rb +1 -1
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/concern.rb +1 -1
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/can_be_called/concern.rb +1 -1
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/can_be_from_exception/concern.rb +1 -1
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/can_be_from_fallback/concern.rb +1 -1
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/can_be_from_handled_exception/concern.rb +6 -1
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/can_be_from_unhandled_exception/concern.rb +1 -1
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/can_be_own_result/concern.rb +1 -1
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/can_be_strict/concern.rb +1 -1
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/can_be_stubbed_result/concern.rb +1 -1
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/can_be_used_in_service_aware_enumerables/concern.rb +1 -1
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/can_have_checked_status/concern.rb +1 -1
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/can_have_fallbacks/concern.rb +1 -1
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/can_have_parent_result/concern.rb +1 -1
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/can_have_step/concern.rb +1 -1
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_amazing_print_inspect/concern.rb +1 -1
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_awesome_print_inspect/concern.rb +1 -1
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_inspect/concern.rb +1 -1
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/concern/instance_methods.rb +7 -0
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/concern.rb +1 -1
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/code/concern.rb +1 -1
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/code/plugins/has_amazing_print_inspect/concern.rb +1 -1
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/code/plugins/has_awesome_print_inspect/concern.rb +1 -1
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/code/plugins/has_inspect/concern.rb +1 -1
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/data/concern.rb +1 -1
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/data/plugins/has_amazing_print_inspect/concern.rb +1 -1
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/data/plugins/has_awesome_print_inspect/concern.rb +1 -1
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/data/plugins/has_inspect/concern.rb +1 -1
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/message/concern.rb +1 -1
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/message/plugins/has_amazing_print_inspect/concern.rb +1 -1
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/message/plugins/has_awesome_print_inspect/concern.rb +1 -1
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/message/plugins/has_inspect/concern.rb +1 -1
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/status/concern.rb +1 -1
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/status/plugins/can_be_checked/concern.rb +1 -1
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/status/plugins/has_amazing_print_inspect/concern.rb +1 -1
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/status/plugins/has_awesome_print_inspect/concern.rb +1 -1
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/status/plugins/has_inspect/concern.rb +1 -1
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_negated_result/concern.rb +1 -1
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_pattern_matching_support/concern.rb +1 -1
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/helps_to_learn_similarities_with_common_objects/concern.rb +1 -1
- data/lib/convenient_service/service/plugins/has_j_send_result_params_validations/using_active_model_validations/concern.rb +15 -3
- data/lib/convenient_service/service/plugins/has_j_send_result_params_validations/using_active_model_validations/middleware.rb +10 -2
- data/lib/convenient_service/service/plugins/has_j_send_result_params_validations/using_active_model_validations/no_op_concern.rb +116 -0
- data/lib/convenient_service/service/plugins/has_j_send_result_params_validations/using_active_model_validations.rb +1 -0
- data/lib/convenient_service/service/plugins/has_j_send_result_params_validations/using_dry_validation/concern.rb +19 -1
- data/lib/convenient_service/service/plugins/has_j_send_result_params_validations/using_dry_validation/middleware.rb +10 -2
- data/lib/convenient_service/service/plugins/has_j_send_result_params_validations/using_dry_validation/no_op_concern.rb +43 -0
- data/lib/convenient_service/service/plugins/has_j_send_result_params_validations/using_dry_validation.rb +1 -0
- data/lib/convenient_service/service/plugins/has_j_send_result_short_syntax/concern.rb +1 -1
- data/lib/convenient_service/service/plugins/has_j_send_result_status_check_short_syntax/concern.rb +1 -1
- data/lib/convenient_service/service/plugins/has_negated_j_send_result/concern.rb +1 -1
- data/lib/convenient_service/service/plugins/has_negated_result/concern.rb +1 -1
- data/lib/convenient_service/service/plugins/has_result/concern.rb +1 -1
- data/lib/convenient_service/service/plugins/raises_on_not_result_return_value/middleware.rb +7 -3
- data/lib/convenient_service/version.rb +1 -1
- metadata +12 -2
|
@@ -14,7 +14,7 @@ module ConvenientService
|
|
|
14
14
|
module Plugins
|
|
15
15
|
module CanBeFromHandledException
|
|
16
16
|
module Concern
|
|
17
|
-
include
|
|
17
|
+
include ::ConvenientService::Concern
|
|
18
18
|
|
|
19
19
|
instance_methods do
|
|
20
20
|
##
|
|
@@ -35,8 +35,13 @@ module ConvenientService
|
|
|
35
35
|
extra_kwargs.dig(:exceptions, :handled)
|
|
36
36
|
end
|
|
37
37
|
|
|
38
|
+
##
|
|
39
|
+
# @return [ConvenientService::Service::Plugins::HasJSendResult::Entities::Result]
|
|
40
|
+
# @raise [ConvenientService::Service::Plugins::HasJSendResult::Entities::Result::Plugins::CanBeFromHandledException::Exceptions::FromExceptionOnNotErrorResult]
|
|
41
|
+
#
|
|
38
42
|
def from_exception(exception, **kwargs)
|
|
39
43
|
::ConvenientService.raise Exceptions::FromExceptionOnNotErrorResult.new(result: self) unless status.unsafe_error?
|
|
44
|
+
|
|
40
45
|
data =
|
|
41
46
|
if Service::Plugins::HasJSendResult.default_error_data == unsafe_data.to_h
|
|
42
47
|
{handled_exception: exception}
|
|
@@ -103,6 +103,13 @@ module ConvenientService
|
|
|
103
103
|
internals.cache[:jsend_attributes]
|
|
104
104
|
end
|
|
105
105
|
|
|
106
|
+
##
|
|
107
|
+
# @return [ConvenientService::Service::Plugins::HasJSendResult::Entities::Result]
|
|
108
|
+
#
|
|
109
|
+
def result
|
|
110
|
+
self
|
|
111
|
+
end
|
|
112
|
+
|
|
106
113
|
##
|
|
107
114
|
# @param status [Symbol]
|
|
108
115
|
# @return [ConvenientService::Service::Plugins::HasJSendResult::Entities::Result::Plugins::HasJSendStatusAndAttributes::Entities::Status]
|
|
@@ -11,10 +11,22 @@ module ConvenientService
|
|
|
11
11
|
module HasJSendResultParamsValidations
|
|
12
12
|
module UsingActiveModelValidations
|
|
13
13
|
module Concern
|
|
14
|
-
include
|
|
14
|
+
include ::ConvenientService::Concern
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
class << self
|
|
17
|
+
##
|
|
18
|
+
# @param skip_validations [Boolean]
|
|
19
|
+
# @return [Module]
|
|
20
|
+
#
|
|
21
|
+
def with(skip_validations: false)
|
|
22
|
+
return self unless skip_validations
|
|
23
|
+
|
|
24
|
+
Plugins::HasJSendResultParamsValidations::UsingActiveModelValidations::NoOpConcern
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
included do
|
|
29
|
+
include ::ActiveModel::Validations
|
|
18
30
|
end
|
|
19
31
|
end
|
|
20
32
|
end
|
|
@@ -17,9 +17,10 @@ module ConvenientService
|
|
|
17
17
|
# @return [ConvenientService::Service::Plugins::HasJSendResult::Entities::Result]
|
|
18
18
|
#
|
|
19
19
|
def next(...)
|
|
20
|
-
return
|
|
20
|
+
return chain.next(...) if skip_validations?
|
|
21
|
+
return chain.next(...) if active_model_validations_errors.none?
|
|
21
22
|
|
|
22
|
-
|
|
23
|
+
result_from_active_model_validations
|
|
23
24
|
end
|
|
24
25
|
|
|
25
26
|
private
|
|
@@ -57,6 +58,13 @@ module ConvenientService
|
|
|
57
58
|
def status
|
|
58
59
|
middleware_arguments.kwargs.fetch(:status) { :error }
|
|
59
60
|
end
|
|
61
|
+
|
|
62
|
+
##
|
|
63
|
+
# @return [Boolean]
|
|
64
|
+
#
|
|
65
|
+
def skip_validations?
|
|
66
|
+
middleware_arguments.kwargs.fetch(:skip_validations) { false }
|
|
67
|
+
end
|
|
60
68
|
end
|
|
61
69
|
end
|
|
62
70
|
end
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
##
|
|
4
|
+
# @author Marian Kostyk <mariankostyk13895@gmail.com>
|
|
5
|
+
# @license LGPLv3 <https://www.gnu.org/licenses/lgpl-3.0.html>
|
|
6
|
+
##
|
|
7
|
+
|
|
8
|
+
module ConvenientService
|
|
9
|
+
module Service
|
|
10
|
+
module Plugins
|
|
11
|
+
module HasJSendResultParamsValidations
|
|
12
|
+
module UsingActiveModelValidations
|
|
13
|
+
module NoOpConcern
|
|
14
|
+
include ::ConvenientService::Concern
|
|
15
|
+
|
|
16
|
+
class << self
|
|
17
|
+
##
|
|
18
|
+
# @param skip_validations [Boolean]
|
|
19
|
+
# @return [Module]
|
|
20
|
+
#
|
|
21
|
+
def with(skip_validations: false)
|
|
22
|
+
return self if skip_validations
|
|
23
|
+
|
|
24
|
+
Plugins::HasJSendResultParamsValidations::UsingActiveModelValidations::Concern
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
class_methods do
|
|
29
|
+
##
|
|
30
|
+
# @return [void]
|
|
31
|
+
# @see https://github.com/rails/rails/blob/v8.1.4/activemodel/lib/active_model/validations/validates.rb#L111
|
|
32
|
+
#
|
|
33
|
+
def validates(*attributes)
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
##
|
|
37
|
+
# @return [void]
|
|
38
|
+
# @see https://github.com/rails/rails/blob/v8.1.4/activemodel/lib/active_model/validations/validates.rb#L153
|
|
39
|
+
#
|
|
40
|
+
def validates!(*attributes)
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
##
|
|
44
|
+
# @return [void]
|
|
45
|
+
# @see https://github.com/rails/rails/blob/v8.1.4/activemodel/lib/active_model/validations.rb#L89
|
|
46
|
+
#
|
|
47
|
+
def validates_each(*attr_names, &block)
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
##
|
|
51
|
+
# @return [void]
|
|
52
|
+
# @see https://github.com/rails/rails/blob/v8.1.4/activemodel/lib/active_model/validations.rb#L162
|
|
53
|
+
#
|
|
54
|
+
def validate(*args, &block)
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
##
|
|
58
|
+
# @return [void]
|
|
59
|
+
# @see https://github.com/rails/rails/blob/v8.1.4/activemodel/lib/active_model/validations.rb#L206
|
|
60
|
+
#
|
|
61
|
+
def validators
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
##
|
|
65
|
+
# @return [void]
|
|
66
|
+
# @see https://github.com/rails/rails/blob/v8.1.4/activemodel/lib/active_model/validations.rb#L268
|
|
67
|
+
#
|
|
68
|
+
def validators_on(*attributes)
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
instance_methods do
|
|
73
|
+
##
|
|
74
|
+
# @return [Array]
|
|
75
|
+
# @see https://github.com/rails/rails/blob/v8.1.4/activemodel/lib/active_model/validations.rb#L330
|
|
76
|
+
#
|
|
77
|
+
def errors
|
|
78
|
+
@errors ||= []
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
##
|
|
82
|
+
# @return [Boolean]
|
|
83
|
+
# @see https://github.com/rails/rails/blob/v8.1.4/activemodel/lib/active_model/validations.rb#L363
|
|
84
|
+
#
|
|
85
|
+
def valid?(context = nil)
|
|
86
|
+
true
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
##
|
|
90
|
+
# @return [Boolean]
|
|
91
|
+
# @see https://github.com/rails/rails/blob/v8.1.4/activemodel/lib/active_model/validations.rb#L372
|
|
92
|
+
#
|
|
93
|
+
alias_method :validate, :valid?
|
|
94
|
+
|
|
95
|
+
##
|
|
96
|
+
# @return [Boolean]
|
|
97
|
+
# @see https://github.com/rails/rails/blob/v8.1.4/activemodel/lib/active_model/validations.rb#L410
|
|
98
|
+
#
|
|
99
|
+
def invalid?(context = nil)
|
|
100
|
+
false
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
##
|
|
104
|
+
# @return [Boolean]
|
|
105
|
+
# @see https://github.com/rails/rails/blob/v8.1.4/activemodel/lib/active_model/validations.rb#L419
|
|
106
|
+
#
|
|
107
|
+
def validate!(context = nil)
|
|
108
|
+
true
|
|
109
|
+
end
|
|
110
|
+
end
|
|
111
|
+
end
|
|
112
|
+
end
|
|
113
|
+
end
|
|
114
|
+
end
|
|
115
|
+
end
|
|
116
|
+
end
|