webrat/spec/integration/merb/app/controllers/testing.rb

28 lines
432 B
Ruby
Raw Normal View History

class Testing < Application
2009-04-08 00:30:12 +00:00
def show_form
render
end
2009-04-08 00:30:12 +00:00
def upload
case request.method
when :get then render
when :post then
uploaded_file = params[:uploaded_file]
render [uploaded_file[:filename], uploaded_file[:tempfile].class.name].inspect
end
end
def submit_form
end
2009-04-08 00:30:12 +00:00
2009-01-05 04:56:52 +00:00
def internal_redirect
redirect "/"
end
2009-04-08 00:30:12 +00:00
2009-01-05 04:56:52 +00:00
def external_redirect
redirect "http://google.com"
end
2009-04-08 00:30:12 +00:00
end