This repository has been archived on 2024-03-16. You can view files and clone it, but cannot push or open issues or pull requests.
orbit-4-1/app/controllers/announcements_controller.rb

30 lines
801 B
Ruby
Raw Normal View History

2009-06-01 02:54:16 +00:00
class AnnouncementsController < ApplicationController
2009-06-01 02:54:16 +00:00
def index
2010-03-01 08:18:28 +00:00
@announcements = Announcement.all( :conditions => { :entry_name => params[:entry_name] })
2009-06-01 02:54:16 +00:00
respond_to do |format|
format.html {
@page = Page.find_by_name( 'announcement_index')
@page_options = { "announcements" => @announcements.map{ |a| a.to_liquid } }
render_liquid_page
}
2009-06-01 02:54:16 +00:00
format.xml { render :xml => @announcements }
end
end
def show
@announcement = Announcement.find(params[:id])
respond_to do |format|
format.html{
@page = Page.find_by_name( 'announcement_show')
@page_options = { 'announcement' => @announcement.to_liquid }
render_liquid_page
}
2009-06-01 02:54:16 +00:00
format.xml { render :xml => @announcement }
end
end
end