Set session on jQuery.load function

Hi,
I have a strange problem.
Scenario:
When loading an x page. I am making an ajax call in jQuery to server
‘latest’ action. Now, when I set a session in ‘latest’ action. To check
check created session I made another ajax request to same ‘latest’
action.

Here created session is nil.
code:
--------------------------sample.js------------------------------
$("#latest_activities").load("#{latest_activities_path}");

$(’.get-activities’).click(function(){
//ajax request to latest_activities_path
});

def latest
p session[‘test’]
session[‘test’] = ‘test’
end

I did got why it is not persisted.

Thanks,
Aashish

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs