class AddressesController

Public Instance Methods

action() click to toggle source
# 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
Also aliased as: new, create, update, destroy
another() click to toggle source
# File test/flash_responder_test.rb, line 29
def another
  respond_with(@resource, :notice => "Yes, notice this!", :alert => "Warning, warning!")
end
create() click to toggle source
Alias for: action
destroy() click to toggle source
Alias for: action
flexible() click to toggle source
# File test/flash_responder_test.rb, line 37
def flexible
  options = params[:responder_options] || {}
  respond_with(@resource, options)
end
new() click to toggle source
Alias for: action
update() click to toggle source
Alias for: action
with_block() click to toggle source
# File test/flash_responder_test.rb, line 23
def with_block
  respond_with(@resource) do |format|
    format.html { render :text => "Success!" }
  end
end
with_html() click to toggle source
# File test/flash_responder_test.rb, line 33
def with_html
  respond_with(@resource)
end

Protected Instance Methods

interpolation_options() click to toggle source
# File test/flash_responder_test.rb, line 44
def interpolation_options
  { :reference => 'Ocean Avenue', :xss => '<script>alert(1)</script>' }
end
set_resource() click to toggle source
# File test/flash_responder_test.rb, line 48
def set_resource
  @resource = Address.new
  @resource.errors[:fail] << "FAIL" if params[:fail]
end