Class: Menu

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

Instance Method Summary collapse

Instance Method Details

#activateObject



21
22
23
# File 'app/models/menu.rb', line 21

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

#cloneObject



25
26
27
28
29
# File 'app/models/menu.rb', line 25

def clone
  menu = super
  menu.menu_links = self.menu_links.collect(&:clone)
  return menu
end