Class: HomeController

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

Instance Method Summary collapse

Methods inherited from ApplicationController

#fresh_when, #redirect_back_or_default, #redirect_referrer_or_default, #render_403, #render_404, #render_optional_error_file, #require_user, #set_active_menu, #set_locale, #set_seo_meta, #store_location, #unread_notify_count

Instance Method Details

#apiObject


8
9
10
# File 'app/controllers/home_controller.rb', line 8

def api
  @routes = []
end

#error_404Object


16
17
18
# File 'app/controllers/home_controller.rb', line 16

def error_404
  render_404
end

#indexObject


2
3
4
5
6
# File 'app/controllers/home_controller.rb', line 2

def index
  @excellent_topics = Topic.excellent.recent.fields_for_list.limit(20).to_a

  fresh_when(etag: [@excellent_topics, Setting.index_html])
end

#markdownObject


20
21
22
# File 'app/controllers/home_controller.rb', line 20

def markdown
  set_seo_meta('Markdown Guide')
end

#twitterObject


12
13
14
# File 'app/controllers/home_controller.rb', line 12

def twitter
  set_seo_meta t('menu.tweets')
end