Sha256: 7e1930f6c892b427fb93ac100ab57dad9a346dcae500f6c9e692ed67c9d01dea

Contents?: true

Size: 479 Bytes

Versions: 11

Compression:

Stored size: 479 Bytes

Contents

class AjaxController < ApplicationController
  after_filter :clear_return_to

  # Don't return to the framework path, return to root
  def clear_return_to
    return unless Ajax.is_enabled?
    if session[:return_to] =~ %r[#{Ajax.framework_path}]
      session[:return_to] = session[:return_to].sub(%r[#{Ajax.framework_path}], '/')
      Rails.logger.info("[ajax] return_to / instead of #{Ajax.framework_path}")
    end
  end

  unloadable # needed when installed as a plugin
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
ajax-1.0.8 app/controllers/ajax_controller.rb
ajax-1.0.7 app/controllers/ajax_controller.rb
ajax-1.0.6 app/controllers/ajax_controller.rb
ajax-1.0.5 app/controllers/ajax_controller.rb
ajax-1.0.4 app/controllers/ajax_controller.rb
ajax-1.0.3 app/controllers/ajax_controller.rb
ajax-1.0.2 app/controllers/ajax_controller.rb
ajax-1.0.1 app/controllers/ajax_controller.rb
ajax-0.1.7 app/controllers/ajax_controller.rb
ajax-0.1.6 app/controllers/ajax_controller.rb
ajax-0.1.5 app/controllers/ajax_controller.rb