Module: Sequel::Plugins::Paranoia::ClassMethods
- Defined in:
- lib/sequel_paranoia.rb
Instance Attribute Summary collapse
-
#deleted_timestamp_field ⇒ Object
readonly
The field to store the deleted timestamp.
Instance Method Summary collapse
-
#deleted_timestamp_overwrite? ⇒ Boolean
Whether to overwrite the deleted timestamp if it already exists.
-
#inherited(subclass) ⇒ Object
Copy the class instance variables used from the superclass to the subclass.
- #with_deleted ⇒ Object
Instance Attribute Details
#deleted_timestamp_field ⇒ Object (readonly)
The field to store the deleted timestamp
40 41 42 |
# File 'lib/sequel_paranoia.rb', line 40 def @deleted_timestamp_field end |
Instance Method Details
#deleted_timestamp_overwrite? ⇒ Boolean
Whether to overwrite the deleted timestamp if it already exists
43 44 45 |
# File 'lib/sequel_paranoia.rb', line 43 def @deleted_timestamp_overwrite end |
#inherited(subclass) ⇒ Object
Copy the class instance variables used from the superclass to the subclass
48 49 50 51 52 53 |
# File 'lib/sequel_paranoia.rb', line 48 def inherited(subclass) super [:@deleted_timestamp_field, :@deleted_timestamp_overwrite].each do |iv| subclass.instance_variable_set(iv, instance_variable_get(iv)) end end |
#with_deleted ⇒ Object
55 56 57 |
# File 'lib/sequel_paranoia.rb', line 55 def with_deleted dataset.unfiltered end |