Class: SitemapController

Inherits:
BaseController show all
Defined in:
app/controllers/sitemap_controller.rb

Instance Method Summary collapse

Methods inherited from BaseController

#advertise, #cache_action?, #css_help, #footer_content, #homepage_features, #plaxo, #rss_site_index, #site_index

Methods included from BaseHelper

#add_friend_link, #ajax_spinner_for, #avatar_for, #block_to_partial, #box, #city_cloud, #clippings_link, #commentable_url, #excerpt_with_jump, #feed_icon_tag, #forum_page?, #is_current_user_and_featured?, #last_active, #more_comments_links, #page_title, #paginating_links, #possesive, #profile_completeness, #rounded, #search_posts_title, #search_user_posts_path, #show_footer_content?, #time_ago_in_words, #time_ago_in_words_or_date, #tiny_mce_init_if_needed, #topnav_tab, #truncate_words, #truncate_words_with_highlight

Methods included from LocalizedApplication

#get_matching_ui_locale, #get_sorted_langs_from_accept_header, #get_valid_lang_from_accept_header, #set_locale

Methods included from AuthenticatedSystem

#login_by_token, #update_last_seen_at

Instance Method Details

#indexObject



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

def index
  @users = User.active.select('id, login, updated_at, login_slug')
  @posts = Post.select('posts.id, posts.user_id, posts.published_as, posts.published_at, users.id, users.login_slug').joins(:user)   #"LEFT JOIN users ON users.id = posts.user_id")

  @categories = Category.find(:all)

  respond_to do |format|
    format.html {
      render :layout => 'application'
    }
    format.xml 
  end
end