Sha256: 87c4c7fd2ef7e767f508b13d9d5deb29798134754fca9555e7b6380c250d0b13

Contents?: true

Size: 588 Bytes

Versions: 24

Compression:

Stored size: 588 Bytes

Contents

module Rack::App::SingletonMethods::ParamsValidator
  def validate_params(&block)
    descriptor = Rack::App::Middlewares::Params::Definition.new(&block).to_descriptor
    route_registration_properties[:params]= descriptor
    next_endpoint_middlewares do |builder|
      builder.use(Rack::App::Middlewares::Params::Setter)
      builder.use(Rack::App::Middlewares::Params::Validator, descriptor)
      builder.use(Rack::App::Middlewares::Params::Parser, descriptor)
    end
  end
  alias params validate_params
  Rack::App::Utils.deprecate(self, :params, :validate_params, 2016, 10)
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
rack-app-6.8.0 lib/rack/app/singleton_methods/params_validator.rb
rack-app-6.7.1 lib/rack/app/singleton_methods/params_validator.rb
rack-app-6.7.0 lib/rack/app/singleton_methods/params_validator.rb
rack-app-6.6.0 lib/rack/app/singleton_methods/params_validator.rb
rack-app-6.5.0 lib/rack/app/singleton_methods/params_validator.rb
rack-app-6.4.1 lib/rack/app/singleton_methods/params_validator.rb
rack-app-6.4.0 lib/rack/app/singleton_methods/params_validator.rb
rack-app-6.3.3 lib/rack/app/singleton_methods/params_validator.rb
rack-app-6.3.2 lib/rack/app/singleton_methods/params_validator.rb
rack-app-6.3.1 lib/rack/app/singleton_methods/params_validator.rb
rack-app-6.3.0 lib/rack/app/singleton_methods/params_validator.rb
rack-app-6.2.0 lib/rack/app/singleton_methods/params_validator.rb
rack-app-6.1.0 lib/rack/app/singleton_methods/params_validator.rb
rack-app-6.0.0 lib/rack/app/singleton_methods/params_validator.rb
rack-app-5.12.0 lib/rack/app/singleton_methods/params_validator.rb
rack-app-5.11.1 lib/rack/app/singleton_methods/params_validator.rb
rack-app-5.11.0 lib/rack/app/singleton_methods/params_validator.rb
rack-app-5.10.2 lib/rack/app/singleton_methods/params_validator.rb
rack-app-5.10.1 lib/rack/app/singleton_methods/params_validator.rb
rack-app-5.10.0 lib/rack/app/singleton_methods/params_validator.rb