Kind of a strange problem, hopefully someone can help me out.
I want to set a session in my rails controller which I hit via jquery ajax post.
Its a regular rails form which i submit via ajax
$.post($(this).attr('action'), $(this).serialize(), function(data){
}, 'json');
which hits the leads controller
def create
@lead = Lead.new(params[:lead])
@lead.save!
if @lead.save
session[:lead] = "#{@lead.id}"
end
end
however the session doesnt seem to be set across the ajax call.
Anyone have an ideas on this?