not compitable with our tech

This commit is contained in:
Yan
2017-09-21 17:51:59 +06:30
parent 1a4ca5238f
commit 3e4fc7d45d
9 changed files with 486 additions and 506 deletions

View File

@@ -1,14 +1,17 @@
class HomeController < ApplicationController
skip_before_action :authenticate, only: [:index, :show, :create, :update, :destroy]
# layout "application", except: [:index, :show]
skip_before_action :authenticate, only: [:index, :show, :create, :update, :destroy]
def index
@employees = Employee.all_emp_except_waiter.order("name asc")
@login_form = LoginForm.new()
render "layouts/initial", layout: false
end
def show
@login_form = LoginForm.new()
@login_form.emp_id = params[:emp_id]
render "layouts/initial", layout: false
end
def update
@@ -23,7 +26,7 @@ class HomeController < ApplicationController
else
flash[:notice] ="Invalid PIN for Employee. Please try again!"
render :show
end
end
end
def create
@@ -69,6 +72,7 @@ class HomeController < ApplicationController
end
private
# Never trust parameters from the scary internet, only allow the white list through.
def settings_home_params
params.require(:login_form).permit(:emp_id, :password)