class HomeController < ApplicationController
def index
@stories = find_stories_for_user_and_tag_and_newest(@user, nil, false)
@rss_link ||= ""
respond_to do |format|
format.html { render :action => "index" }
format.rss { render :action => "rss", :layout => false }
end
end
def newest
@stories = find_stories_for_user_and_tag_and_newest(@user, nil, true)
@page_title = "Newest Stories"
@rss_link = ""
@title = "Newest Stories"
@title_url = "/newest"
respond_to do |format|
format.html { render :action => "index" }
format.rss { render :action => "rss", :layout => false }
end
end
def tagged
@tag = Tag.find_by_tag!(params[:tag])
@stories = find_stories_for_user_and_tag_and_newest(@user, @tag, false)
@page_title = @tag.description
@rss_link = ""
@title = @tag.description.blank?? @tag.tag : @tag.description
@title_url = tag_url(@tag.tag)
respond_to do |format|
format.html { render :action => "index" }
format.rss { render :action => "rss", :layout => false }
end
end
end