module Sequel::Plugins::WhitelistSecurity

  1. lib/sequel/plugins/whitelist_security.rb

The whitelist_security plugin contains whitelist-based support for mass assignment, explicitly specifying which columns to allow mass assignment for, disallowing mass assignment for columns not listed. This exists mostly for backwards compatibility, it's best to use Sequel::Model#set_fields and Sequel::Model#update_fields to decide which fields to allow on a per-call basis.


# Make all model subclasses support allowed_columns 
Sequel::Model.plugin :whitelist_security

# Make the Album class support allowed_columns
Album.plugin :whitelist_security