Module: Sequel::Plugins::Scissors

Defined in:


The scissors plugin adds class methods for update, delete, and destroy. It is so named because this is considered dangerous, since it is easy to write:


and delete all rows in the table, when you meant to write:


and only delete a single row.

This plugin is mostly useful for backwards compatibility, and not recommended for use in production. However, it can cut down on verbosity in non-transactional test code, so it may be appropriate to use when testing.


# Make all model subclass run with scissors
Sequel::Model.plugin :scissors

# Make the Album class run with scissors
Album.plugin :scissors

Defined Under Namespace

Modules: ClassMethods