Sha256: 53b5cb0caddc170cf7ff4cb3aaf161b12a125dc716d6330b1f2796fc3336244b
Contents?: true
Size: 538 Bytes
Versions: 4
Compression:
Stored size: 538 Bytes
Contents
class ApplicationController < ActionController::Base protect_from_forgery before_filter :slowajaxload ajax_respond :section_id => "global", :render => { :layout => "ajax" }, :except => "about" ajax_respond :section_id => "global", :render => { :layout => "ajax" }, :only => "about" # assuming :except option works, this line tests the :only option def slowajaxload if (!ajax_section.nil?) && Rails.env == "test" delay = 0 delay = ENV['AJAX_DELAY'] if ENV['AJAX_DELAY'] sleep(delay.to_f) end end end
Version data entries
4 entries across 4 versions & 1 rubygems