not compitable with our tech
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user