# THE BELOW MENTIONED FUNCTION WILL BE USED TO STORE THE SESSION VALUE SO THAT SESSION VARIABLES CAN BE USED IN MODEL...
module UserInfo
def get_current_user_in_model
Thread.current[:user]
end
def self.get_current_user_in_model=(user)
Thread.current[:user] = user
end
end
No comments:
Post a Comment