Implement close window on server level
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<script>localStorage.setItem('auth_token', '<%= params[:authentication_token] %>'); localStorage.setItem('user_id', '<%= params[:user_id] %>');window.close()</script>
|
||||
</head>
|
||||
<body></body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user