Module: DeletedAt

Defined in:
lib/deleted_at.rb,
lib/deleted_at/views.rb,
lib/deleted_at/railtie.rb,
lib/deleted_at/version.rb,
lib/deleted_at/active_record/base.rb,
lib/deleted_at/active_record/relation.rb

Defined Under Namespace

Modules: ActiveRecord, Views Classes: Railtie

Constant Summary collapse

VERSION =
"0.2.5"

Class Method Summary collapse

Class Method Details

.install(model) ⇒ Object



12
13
14
15
# File 'lib/deleted_at.rb', line 12

def self.install(model)
  DeletedAt::Views.install_present_view(model)
  DeletedAt::Views.install_deleted_view(model)
end

.loadObject



7
8
9
10
# File 'lib/deleted_at.rb', line 7

def self.load
  ::ActiveRecord::Relation.send :include, DeletedAt::ActiveRecord::Relation
  ::ActiveRecord::Base.send :include, DeletedAt::ActiveRecord::Base
end

.uninstall(model) ⇒ Object



17
18
19
20
# File 'lib/deleted_at.rb', line 17

def self.uninstall(model)
  DeletedAt::Views.uninstall_deleted_view(model)
  DeletedAt::Views.uninstall_present_view(model)
end