Registry / utility / auto-strip-attributes

auto-strip-attributes

JSON →
library2.6.0rbrubygemsunverified

Automatically removes unnecessary whitespace from ActiveRecord or ActiveModel attributes via a before_validation hook.

gem install auto_strip_attributes
INSTALL
IMPORT
SIG · AUTO-STRIP-ATTRIBU
A
auto-strip-attributes
utilityrubyv2.6.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.

AutoStripAttributes
require 'auto_strip_attributes'

Strip whitespace from user input fields

require 'auto_strip_attributes' class User < ActiveRecord::Base auto_strip_attributes :name, :email end
Debug
Known issues
gotchaMay conflict with other before_validation hooks if order is not specified.
fix
Use the :before option to control hook order.
affects: >= 2.0.0
Upgrade
Version history
2.6.0latest on RubyGems
Audit
Dependencies

No dependency data recorded yet.

Agent activity
20 hits · last 30 days
node
18
OpenAI (training)
2
Resources
auto-strip-attributes — gem install auto-strip-attributes · libregistry