Sha256: 3ccb2cca0c36f3249b7611dd1fad6863d9b010f5cedb771a35248dc6911a314f

Contents?: true

Size: 371 Bytes

Versions: 8

Compression:

Stored size: 371 Bytes

Contents

module WeakParameters
  module Controller
    def validates(action_name, &block)
      before_filter only: action_name do
        validator = WeakParameters::Validator.new(params, &block)
        WeakParameters.stats[params[:controller]][params[:action]] = validator
        WeakParameters.stats[params[:controller]][params[:action]].validate
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
weak_parameters-0.1.1 lib/weak_parameters/controller.rb
weak_parameters-0.1.0 lib/weak_parameters/controller.rb
weak_parameters-0.0.9 lib/weak_parameters/controller.rb
weak_parameters-0.0.8 lib/weak_parameters/controller.rb
weak_parameters-0.0.7 lib/weak_parameters/controller.rb
weak_parameters-0.0.6 lib/weak_parameters/controller.rb
weak_parameters-0.0.5 lib/weak_parameters/controller.rb
weak_parameters-0.0.4 lib/weak_parameters/controller.rb