Class: AtomController

Inherits:
ApplicationController show all
Defined in:
app/controllers/atom_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


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

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