Registry / web-framework / weak-parameters

weak-parameters

JSON →
library0.5.0rbrubygemsunverified

Adds a validation filter to your Rails controller for strong parameter-like behavior.

gem install weak_parameters
INSTALL
IMPORT
SIG · WEAK-PARAMETERS
W
weak-parameters
web-frameworkrubyv0.5.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

WeakParameters
require 'weak_parameters'

Validate controller parameters with a declarative schema.

require 'weak_parameters' class UsersController < ApplicationController validate_params do required(:user).schema do required(:name).filled(:string) optional(:email).filled(:string) end end def create # params are validated before reaching here end end
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.5.0latest on RubyGems
Audit
Dependencies

No dependency data recorded yet.

Agent activity
11 hits · last 30 days
node
10
OpenAI (training)
1
Resources
weak-parameters — gem install weak-parameters · libregistry