# File test/flash_responder_test.rb, line 13 def action options = params.slice(:flash, :flash_now) flash[:success] = "Flash is set" if params[:set_flash] respond_with(@resource, options) end
# File test/flash_responder_test.rb, line 29 def another respond_with(@resource, :notice => "Yes, notice this!", :alert => "Warning, warning!") end
# File test/flash_responder_test.rb, line 37 def flexible options = params[:responder_options] || {} respond_with(@resource, options) end
# File test/flash_responder_test.rb, line 23 def with_block respond_with(@resource) do |format| format.html { render :text => "Success!" } end end
# File test/flash_responder_test.rb, line 33 def with_html respond_with(@resource) end
# File test/flash_responder_test.rb, line 44 def interpolation_options { :reference => 'Ocean Avenue', :xss => '<script>alert(1)</script>' } end
# File test/flash_responder_test.rb, line 48 def set_resource @resource = Address.new @resource.errors[:fail] << "FAIL" if params[:fail] end