I have added an authenticator using the instructions here:
The LoginController sets session[“employee”] to an employee.
When i try to access the session[“employee”] from another controller i
get this error :
TypeError (no marshal_dump is defined for class OraNumber):
As you can tell i am using Oracle as the DB. I have added
model:employee to all the controllers that use it and to application.rb.
This is the code :
class LoginController < ApplicationController
if employee = Employee.authenticate(@params[“username”],
session[“employee”] = employee
session[“return_to”] = nil
redirect_to :controller => “weblog”
flash[“alert”] = “Login failed!”
redirect_to :action => “index”
The class i access session[“employee”] from:
class TimesheetController < ApplicationController
session[“return_to”] = @request.request_uri
redirect_to :controller => “login”
I am really stuck and any help would be really appreciated. I know i
could change the column types in the table from number to integer but i
am NOT allowed to do this. For now i can get by passing the employee.id
to the session, but this is not ideal.