Class: RssController

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

Constant Summary

Constants included from PaginationHelper

PaginationHelper::DEFAULT_OPTIONS, PaginationHelper::OPTIONS

Instance Method Summary collapse

Methods included from PaginationHelper

included, #paginate, validate_options!

Instance Method Details

#feedObject



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

def feed
  if @params['user']
    @title    = @user.title
    @subtitle = @user.subtitle
    @posts    = @user.posts.find_all(nil, 'created_at desc', @app_config['main']['num_posts']) rescue []
  else
    @posts = Post.find_all(nil, 'updated_at DESC', @app_config['main']['num_posts'])
    @title = @app_config['main']['title']
    @subtitle = @app_config['main']['subtitle']
  end
  #cache_page if ActionController::Base.perform_caching
end