From 69ff935c9e8d40c091c57f4a844f3760de46873a Mon Sep 17 00:00:00 2001 From: Benjamin ter Kuile Date: Thu, 16 Jul 2015 18:55:48 +0200 Subject: [PATCH] compatibility with new cmtool version --- app/controllers/application_controller.rb | 2 +- app/controllers/contact_forms_controller.rb | 2 +- app/views/theme1/_footer.html.slim | 6 +++--- config/application.rb | 2 +- config/routes.rb | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index e718cc20..20838568 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -40,7 +40,7 @@ private when Page then record.name else record end - main_app.go_to_path(str, locale: locale) + main_app.page_path(str, locale: locale) end helper_method :go_to_page_path #END CMTOOL diff --git a/app/controllers/contact_forms_controller.rb b/app/controllers/contact_forms_controller.rb index 8ec02c2b..891f79ca 100644 --- a/app/controllers/contact_forms_controller.rb +++ b/app/controllers/contact_forms_controller.rb @@ -5,7 +5,7 @@ class ContactFormsController < ApplicationController Notifier.contact_form(@contact_form.id).deliver_later redirect_to root_path, notice: t('contact_form.submitted') else - redirect_to go_to_path('contact', locale: I18n.locale), alert: @contact_form.errors.full_messages.join(', ') + redirect_to page_path('contact', locale: I18n.locale), alert: @contact_form.errors.full_messages.join(', ') end end diff --git a/app/views/theme1/_footer.html.slim b/app/views/theme1/_footer.html.slim index d7df0e37..349a5367 100644 --- a/app/views/theme1/_footer.html.slim +++ b/app/views/theme1/_footer.html.slim @@ -5,10 +5,10 @@ .fb-like data-href="http://mozo.bar/" data-layout="button" data-action="like" data-show-faces="true" data-share="true" = link_to t('devise.registrations.link'), main_app.new_suppliers_path, class: 'signup-button' = yield :footer - /= link_to 'disclaimer', go_to_path('disclaimer', locale: 'en') + /= link_to 'disclaimer', page_path('disclaimer', locale: 'en') /' - = link_to 'privacy', main_app.go_to_path('privacy', locale: 'en') + = link_to 'privacy', main_app.page_path('privacy', locale: 'en') ' - = link_to 'contact', main_app.go_to_path('contact', locale: 'en') + = link_to 'contact', main_app.page_path('contact', locale: 'en') .clearfix .footer-bottom © mozo.bar 2015 diff --git a/config/application.rb b/config/application.rb index c7b226d9..ad9602aa 100644 --- a/config/application.rb +++ b/config/application.rb @@ -103,7 +103,7 @@ module Qwaiter end - config.handlebars.templates_root = %w[supplier/app/templates waiter/app/templates user/app/templates] if defined?(Ember::Rails) && defined?(Handlebars) + #config.handlebars.templates_root = %w[supplier/app/templates waiter/app/templates user/app/templates] if defined?(Ember::Rails) && defined?(Handlebars) config.generators do |g| g.orm :simply_stored diff --git a/config/routes.rb b/config/routes.rb index 4824d9ea..226cf2a5 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -190,6 +190,6 @@ Qwaiter::Application.routes.draw do root to: 'pages#home' resources :contact_forms, only: [:create] resources :new_suppliers - get "/:name" => "pages#show", constraints: {name: /.*/}, as: :go_to + get "/:name" => "pages#show", constraints: {name: /.*/}, as: :page end end