I'm setting a timezone for the users using ENV["TZ"] = time_zone
where time_zone is that user time zone.I also have a column in table named 'time_zone'
where that user's timezone is saved.
Now i want to retrieve the event of that users in his time zone.
To retrieve my code in the model:
def set_timezone
Time.zone = current_user.time_zone || "Asia/Kolkata"
end
My controller:
before_filter :set_timezone
But i'm getting this error undefined local variable or method 'set_timezone' for SchedulersController:0x533fa78
Any Idea what could be the issue?