![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi All In my application,i have a form which contains a select box for "categories" And when the user selects a category,a remote function is called which fetches a list of subcategories and populates in another select box on the form div id="categorylist" div id="category">Category:<%= collection_select :category, :id, @categories, :id , :name, {}, {:size => 10, nchange =remote_function( :update => "subcat", :url => { :controller = "categories", :action => "get_subcategories"}, osition => "replace",:with => "'category_id='+this.value" ) } %></div /div I have a div with id "subcat" on the form. I also have set a session timeout of 10 mins. I am getting my page redirected to login page if not the session is present/timed out.I am doing this by having the function called "login_required" in the application.rb controller and in all controllers I am adding before_filter :login_required But this is working only in case of Normal Http requests. In the above case,if the session has expired,and the user is trying to populate the subcategory list using remote call,I am getting the error message updated in the div with id subcat . But I want the page to be redirected to login page,even when there are remote calls to the function if session has timed out. I am in need of a solution at the earliest.Kindly help me Thanks Charanya |
#3
| |||
| |||
|
![]() |
| Thread Tools | |
| Display Modes | |
| |