My question is similar to this question. Though I have not been able to figure it out yet. I want to be able to find the user id from the session. I understand that this can only be done within the controller, though I need this for a model method called Activity.log...
In my controller, I have the following:
@current_user = User.find(session[:user_id])
user_id = @current_user.id
Activity.log(user_id)
I hope that I am at least on the right track, and from the other SO question I have linked to, I have assumed that sessions is still the best way to achieve this, though I am open to suggestions. Thanks!