class ModalResponder::Rails::ModalResponder
Public Instance Methods
default_render(*args)
click to toggle source
# File lib/modal-responder-rails/modal_responder.rb, line 15 def default_render(*args) render(*args) end
redirect_to(options)
click to toggle source
# File lib/modal-responder-rails/modal_responder.rb, line 19 def redirect_to(options) if request.xhr? head :ok, location: controller.url_for(options) else controller.redirect_to(options) end end
render(*args)
click to toggle source
# File lib/modal-responder-rails/modal_responder.rb, line 7 def render(*args) options = args.extract_options! if request.xhr? options.merge! layout: modal_layout end controller.render *args, options end