ruby on rails 3 - how to use sessions in my project to store project id and how to match sessions in code -


i want store selected project's project_id in session , check current user logged in... , match in _shared.html.erb file.

how can write condition in _shared file , how can match them in controller??\

i selecting project dropdown list.

jquery needed do... got id of selected project in dropdown list not able list activity...

@project = project.find(params[:id])     session[:project_id] = @project.id 

is works store session?

i want list activity acording project select dropdown list , make session until select next project.

all activity should change project dashboard. , same other links works it.

if have best , understandable ajax video or tutorial link pls suggest me....

thanks in advance.. :)

this way u can store in sessions.

 @project = project.find(params[:id])      session[:project_id] = @project.id 

you going in right direction. , access session using

 session[:project_id] 

where u needed.


Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -