Class: EventsPortlet

Inherits:
Cms::Portlet
  • Object
show all
Defined in:
app/portlets/events_portlet.rb

Instance Method Summary collapse

Instance Method Details

#renderObject



5
6
7
8
9
10
11
# File 'app/portlets/events_portlet.rb', line 5

def render
  if self.category_id.blank?
    @events = BcmsEvent::Event.published.all
  else
    @events = BcmsEvent::Event.published.all(:conditions => {:category_id => self.category_id})
  end
end