Class: FeedsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/feeds_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

caches_page_with_cache_marker, #raise_not_found!

Instance Method Details

#indexObject



7
8
9
10
11
12
13
14
15
16
# File 'app/controllers/feeds_controller.rb', line 7

def index
  @items =  Post.past
  @items += Structure.with_position(PositionType.footer).visible.sorted

  respond_to do |format|
    format.atom
    format.rss { redirect_to feeds_path(format: :atom), status: :moved_permanently }
    format.xml { redirect_to feeds_path(format: :atom), status: :moved_permanently }
  end
end