commit
d334384a74
@ -78,6 +78,7 @@ class ApplicationController < LinguaFrancaApplicationController
|
||||
end
|
||||
|
||||
def do_404
|
||||
params[:action] = 'error-403'
|
||||
render 'application/404', status: 404
|
||||
end
|
||||
|
||||
@ -87,6 +88,7 @@ class ApplicationController < LinguaFrancaApplicationController
|
||||
|
||||
def do_403(template = nil)
|
||||
@template = template
|
||||
params[:action] = 'error-403'
|
||||
render 'application/permission_denied', status: 403
|
||||
end
|
||||
|
||||
|
@ -122,8 +122,7 @@ module ApplicationHelper
|
||||
@@body_class << (c.is_a?(Array) ? c.join(' ') : c)
|
||||
end
|
||||
|
||||
def page_style#(style)
|
||||
#classes = ['page-style-' + style.to_s]
|
||||
def page_style
|
||||
classes = Array.new
|
||||
|
||||
classes << 'has-translations' if ThereAreTranslationsOnThisPage?
|
||||
|
@ -29,6 +29,7 @@ module BikeBike
|
||||
config.i18n.enforce_available_locales = false
|
||||
self.paths['config/database'] = Rails.root.join('config', 'database.yml')
|
||||
config.active_record.raise_in_transactional_callbacks = true
|
||||
config.exceptions_app = self.routes
|
||||
|
||||
if Rails.env == 'development' || Rails.env == 'test'
|
||||
I18n.config.language_detection_method = I18n::Config::DETECT_LANGUAGE_FROM_URL_PARAM
|
||||
|
@ -46,9 +46,10 @@ BikeBike::Application.routes.draw do
|
||||
post '/logout' => 'application#user_logout', :as => :logout
|
||||
post '/translator-request' => 'application#translator_request', :as => :translator_request
|
||||
|
||||
get '/error_404' => 'application#error_404'
|
||||
get '/about' => 'application#about', :as => :about
|
||||
get '/policy' => 'application#policy', :as => :policy
|
||||
root 'application#home', :as => :home
|
||||
get '/error_404' => 'application#error_404'
|
||||
get '/404' => 'application#error_404'
|
||||
get '/about' => 'application#about', :as => :about
|
||||
get '/policy' => 'application#policy', :as => :policy
|
||||
root 'application#home', :as => :home
|
||||
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user