module Dry::Rails::Features::SafeParams::ClassMethods
ApplicationController methods
@api public
Public Instance Methods
schema(*actions, &block)
click to toggle source
Define a schema for controller action(s)
@param actions [Array<Symbol>]
@return [self]
@api public
# File lib/dry/rails/features/safe_params.rb, line 33 def schema(*actions, &block) schema = Dry::Schema.Params(&block) actions.each do |name| schemas[name] = schema end self end
schemas()
click to toggle source
Return registered schemas
@api private
# File lib/dry/rails/features/safe_params.rb, line 46 def schemas @schemas ||= {} end