Sha256: b36e494c4e7458b6abfcd3987628a226d857d269a62dbd42cd284d7ae481fe02

Contents?: true

Size: 574 Bytes

Versions: 2

Compression:

Stored size: 574 Bytes

Contents

require 'time'

class AtomController < ApplicationController
  layout nil
  caches_page :feed

  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
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
EliteJournal-1.9.492 app/controllers/atom_controller.rb
EliteJournal-1.9.480 app/controllers/atom_controller.rb