search for: correct_employee

Displaying 1 result from an estimated 1 matches for "correct_employee".

2012 Dec 03
2
Stop User from Changing URL
...tion and autherization system built on the same lines outlined by Michael Hartl, rails tutorial. Here is the employees_controller.rb: class EmployeesController < ApplicationController before_filter :signed_in_employee, only: [:index, :edit, :update] before_filter :correct_employee, only: [:edit, :update] etc etc private def signed_in_employee unless signed_in? store_location redirect_to signin_path, notice: "Please sign in to access this page." end end...