From ad7b396dd1b223db66ee2a23bcd4243f8d8dc294 Mon Sep 17 00:00:00 2001 From: Benjamin ter Kuile Date: Fri, 5 Sep 2014 16:00:44 +0200 Subject: [PATCH] Implement close window on server level --- app/controllers/dashboard_controller.rb | 4 ++++ app/views/dashboard/close_window.html.erb | 7 +++++++ config/routes.rb | 1 + spec/acceptance_steps/users/authentication_steps.rb | 2 +- wip.md | 4 ++-- 5 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 app/views/dashboard/close_window.html.erb diff --git a/app/controllers/dashboard_controller.rb b/app/controllers/dashboard_controller.rb index 88b3fcdb..3292620f 100644 --- a/app/controllers/dashboard_controller.rb +++ b/app/controllers/dashboard_controller.rb @@ -12,6 +12,10 @@ class DashboardController < ApplicationController log.save end + def close_window + render layout: false + end + # Testing action def select_qrcode #@tables = Table.all.sample(2) | List.active.map(&:table) diff --git a/app/views/dashboard/close_window.html.erb b/app/views/dashboard/close_window.html.erb new file mode 100644 index 00000000..4536e3af --- /dev/null +++ b/app/views/dashboard/close_window.html.erb @@ -0,0 +1,7 @@ + + + + + + + diff --git a/config/routes.rb b/config/routes.rb index 8e71699f..a9914edc 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -71,6 +71,7 @@ Qwaiter::Application.routes.draw do post '/user/check_table_join_status' => 'user#check_table_join_status' get '/user/obtain_token' => 'user#obtain_token', as: :user_obtain_token post '/user/obtain_token' => 'user#obtain_token', constraints: {format: :json} + get '/close_window' => 'dashboard#close_window' namespace :users, path: '/user' do resources :product_categories, only: [:index] diff --git a/spec/acceptance_steps/users/authentication_steps.rb b/spec/acceptance_steps/users/authentication_steps.rb index 3cf182d8..64200a9d 100644 --- a/spec/acceptance_steps/users/authentication_steps.rb +++ b/spec/acceptance_steps/users/authentication_steps.rb @@ -7,7 +7,7 @@ step "There is no user information stored in the local storage" do end step "I visit the user obtain token path" do - visit user_obtain_token_path + visit user_root_path # obtain token through ember application end step "I am signed in as a user" do diff --git a/wip.md b/wip.md index 53defebd..87199882 100644 --- a/wip.md +++ b/wip.md @@ -16,7 +16,7 @@ User ---- - test met veel producten -- Only show join requests menu when there actually are join requests +- splash screen Bugs ---- @@ -71,5 +71,5 @@ User Integrations ------------ -- Payleven? Payment - Bonnetjes machine +- Payleven? Payment