Class: Actuality

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/actuality.rb

Instance Method Summary collapse

Instance Method Details

#activateObject



18
19
20
# File 'app/models/actuality.rb', line 18

def activate
  self.update_attribute('active', !self.active )
end

#cloneObject



12
13
14
15
16
# File 'app/models/actuality.rb', line 12

def clone
  cloned = super
  cloned.translations = translations.clone unless translations.empty?
  return cloned
end