Module: Jat::Plugins::ValidateParams
- Defined in:
- lib/jat/plugins/validate_params/validate_params.rb
Class Method Summary collapse
Class Method Details
.load(jat_class, **opts) ⇒ Object
10 11 12 13 14 15 16 17 18 |
# File 'lib/jat/plugins/validate_params/validate_params.rb', line 10 def self.load(jat_class, **opts) if jat_class.plugin_used?(:json_api) jat_class.plugin :json_api_validate_params, **opts elsif jat_class.plugin_used?(:simple_api) jat_class.plugin :simple_api_validate_params, **opts else raise Error, "Please load :json_api or :simple_api plugin first" end end |
.plugin_name ⇒ Object
6 7 8 |
# File 'lib/jat/plugins/validate_params/validate_params.rb', line 6 def self.plugin_name :validate_params end |