# File test/template/prototype_helper_test.rb, line 47 def setup super @template = self end
# File test/template/prototype_helper_test.rb, line 42 def update_details(details) @details = details yield if block_given? end
# File test/template/prototype_helper_test.rb, line 52 def url_for(options) if options.is_a?(String) options else url = "http://www.example.com/" url << options[:action].to_s if options and options[:action] url << "?a=#{options[:a]}" if options && options[:a] url << "&b=#{options[:b]}" if options && options[:a] && options[:b] url end end
# File test/template/prototype_helper_test.rb, line 73 def create_generator block = Proc.new { |*args| yield(*args) if block_given? } JavaScriptGenerator.new self, &block end
# File test/template/prototype_helper_test.rb, line 69 def protect_against_forgery? false end
# File test/template/prototype_helper_test.rb, line 65 def request_forgery_protection_token nil end