From efe17c681f5de76fc5ae038c4d7310d2552c10e0 Mon Sep 17 00:00:00 2001 From: Andreas Stephanides Date: Tue, 16 Jun 2015 16:03:07 +0200 Subject: [PATCH] AutoCommit Die Jun 16 16:03:07 CEST 2015 --- app/controllers/application_controller.rb | 2 +- config/routes.rb | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index eb8fb64..60164ec 100755 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -51,6 +51,6 @@ def current_ability @current_ability ||= Ability.new(current_user, request, params[:key]) end def default_url_options - {locale: I18n.locale, theme: nil , ansicht: nil} + {locale: nil, theme: nil , ansicht: nil} # I18n.locale end end diff --git a/config/routes.rb b/config/routes.rb index 197d4d5..7a522f8 100755 --- a/config/routes.rb +++ b/config/routes.rb @@ -32,9 +32,11 @@ devise_for :users , :controllers=>{:omniauth_callbacks=> "users/omniauth_callbacks"} - scope '(:locale)' do + scope '(:locale)', constraints: {:locale=>/en|de/i} do scope '(t/:theme)' do - + get "" , controller: :home, action: :index + get "intern" , controller: :home, action: :intern + scope '(:ansicht)' do resources :studien, :only=>[:new,:edit,:update,:destroy,:show] do member do @@ -107,7 +109,8 @@ resources :fragen, :only =>[:new, :edit, :update, :destroy, :create] - resources :neuigkeiten, :only => [:show] + resources :neuigkeiten, :only => [:show] , constraints: {id: /\d+/i} + get "neuigkeiten", controller: :rubriken, action: :index, as: "neuigkeiten" resources :rubriken do collection do get 'verwalten' , :action => :alle_verwalten