Module: Ajax::ActionController::Rails3
- Defined in:
- lib/ajax/action_controller.rb
Instance Method Summary collapse
- #_layout_for_option(name) ⇒ Object
-
#redirect_to(options = {}, response_status = {}) ⇒ Object
Rails 3 hook.
Instance Method Details
#_layout_for_option(name) ⇒ Object
127 128 129 130 131 132 133 134 135 |
# File 'lib/ajax/action_controller.rb', line 127 def _layout_for_option(name) default = super if !request.xhr? || !Ajax.is_enabled? default else ajax_layout = _layout_for_ajax(default) ajax_layout && template_exists?(ajax_layout) ? ajax_layout : default end end |
#redirect_to(options = {}, response_status = {}) ⇒ Object
Rails 3 hook. Rails < 3 is handled using redirect_to_full_url. See those docs for info.
119 120 121 122 123 124 |
# File 'lib/ajax/action_controller.rb', line 119 def redirect_to( = {}, response_status = {}) url = _compute_redirect_to_location() if !_ajax_redirect(url) super end end |