Sha256: ae31bba5c7ff8d29cc14eb6cf90373c461d9f29a36ffca7442ba30fb80b36c65
Contents?: true
Size: 690 Bytes
Versions: 4
Compression:
Stored size: 690 Bytes
Contents
# Containment #### Usage ```ruby # 1. Add column to table class AddRegulationsTimestampColumn < ActiveRecord::Migration def change t.datetime :contained_at # - or - add_column :your_model, :contained_at, :datetime end end # 2. Include module class User < ActiveRecord::Base include Lite::Regulations::Containment end ``` #### Methods ```ruby user = User.first user.uncontain! user.uncontained? #=> true user.contain! user.contained? #=> true user.to_containment #=> Returns the visibility state locale string (ex: Contained) ``` #### Scopes ```ruby User.contained # Returns all contained records User.uncontained # Returns all uncontained records ```
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
lite-regulations-1.1.2 | docs/CONTAINMENT.md |
lite-regulations-1.1.1 | docs/CONTAINMENT.md |
lite-regulations-1.1.0 | docs/CONTAINMENT.md |
lite-regulations-1.0.0 | docs/CONTAINMENT.md |