Module: StorageUnit::Core::ClassMethods
- Defined in:
- lib/storage_unit/core.rb
Instance Method Summary collapse
-
#with_deleted ⇒ Object
lifted from acts_as_paranoid, works around github.com/rails/rails/issues/4306 with this in place Post.limit(10).with_deleted, will work as expected.
- #with_deleted_scope_sql ⇒ Object
Instance Method Details
#with_deleted ⇒ Object
lifted from acts_as_paranoid, works around github.com/rails/rails/issues/4306 with this in place Post.limit(10).with_deleted, will work as expected
18 19 20 21 22 |
# File 'lib/storage_unit/core.rb', line 18 def with_deleted scope = self.all scope.where_values.delete(with_deleted_scope_sql) scope end |
#with_deleted_scope_sql ⇒ Object
12 13 14 |
# File 'lib/storage_unit/core.rb', line 12 def with_deleted_scope_sql all.table[storage_unit_opts[:column]].eq(nil).to_sql end |