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