Class: Callbacks::ViewableAfterDestroy

Inherits:
Object
  • Object
show all
Includes:
Restrictor
Defined in:
app/models/callbacks/viewable_after_destroy.rb

Instance Method Summary collapse

Instance Method Details

#callObject



9
10
11
12
13
14
15
# File 'app/models/callbacks/viewable_after_destroy.rb', line 9

def call
  update_list
  m.other_locales.each do |viewable|
    viewable.destroy!
    update_list(viewable.locale)
  end
end

#initObject



5
6
7
# File 'app/models/callbacks/viewable_after_destroy.rb', line 5

def init
  @range = (m.position + 1)..Float::INFINITY
end