Module: Render404::Controller

Defined in:
lib/render_404/controller.rb

Instance Method Summary collapse

Instance Method Details

#render_404Object



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/render_404/controller.rb', line 4

def render_404
  @meta_title = I18n.t("render_404.page_not_found")
  @no_sidebar = true
  locale = I18n.locale
  respond_to do |format|
    format.html {
      render(
        :template => "errors/#{locale}/not_found.html.erb",
        :status => 404,
        :layout => true
      )
    }
    format.all {
      render :nothing => true,
      :status => 404
    }
  end
end