Class: WidgetActuality

Inherits:
Widget
  • Object
show all
Defined in:
app/models/widget_actuality.rb

Instance Method Summary collapse

Methods inherited from Block

#link_with, #linked_with?, #pages, #unlink_with

Instance Method Details

#cloneObject



13
14
15
16
17
# File 'app/models/widget_actuality.rb', line 13

def clone
  cloned = super
  cloned.items = self.items.map(&:clone)
  return cloned
end

#get_actualitiesObject



9
10
11
# File 'app/models/widget_actuality.rb', line 9

def get_actualities
  self.news_since.nil? ? self.items : Actuality.all(:conditions => { :created_at_gte => self.news_since })
end