Render action from post call

Sam Woodard wrote:

I am using the link_to_remote helper to call an action using and XMLHttp request. The action method has a call to render another action if a condition is met:

if session[:prebooking].start_date != nil
  render :action => 'check_rate'

the condition is being met, i.e. I checked that 'session[:prebooking].start_date != nil' is in fact true, but program fails to render 'check_rate'.

To do a normal render from a xhr request you have to use a RJS

render :update do |page|
   if session[:prebooking].start_date.nil?
     # normal RJS
     page.redirect_to :action => :check_rate