diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-04-02 03:07:48 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-04-02 03:10:38 -0700 |
commit | 99a1de487400577affdc5e22da253cc710735956 (patch) | |
tree | 08c48c585db8aaf6525483ec80d8947915d44586 /test/rails/app-2.1.2/app/controllers/foo_controller.rb | |
parent | b11f1901e30955bd4154f715db1522374842912e (diff) | |
download | unicorn-99a1de487400577affdc5e22da253cc710735956.tar.gz |
Recent changes made to the unicorn_rails loader were needed to get ActiveRecordStore to load correctly.
Diffstat (limited to 'test/rails/app-2.1.2/app/controllers/foo_controller.rb')
-rw-r--r-- | test/rails/app-2.1.2/app/controllers/foo_controller.rb | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/test/rails/app-2.1.2/app/controllers/foo_controller.rb b/test/rails/app-2.1.2/app/controllers/foo_controller.rb new file mode 100644 index 0000000..8d877d1 --- /dev/null +++ b/test/rails/app-2.1.2/app/controllers/foo_controller.rb @@ -0,0 +1,34 @@ +require 'digest/sha1' +class FooController < ApplicationController + def index + render :text => "FOO\n" + end + + def xcookie + cookies["foo"] = "cookie #$$" + render :text => "" + end + + def xnotice + flash[:notice] = "session #$$" + render :text => "" + end + + def xpost + if request.post? + digest = Digest::SHA1.new + out = "params: #{params.inspect}\n" + if file = params[:file] + loop do + buf = file.read(4096) or break + digest.update(buf) + end + out << "sha1: #{digest.to_s}\n" + end + headers['content-type'] = 'text/plain' + render :text => out + else + render :status => 403, :text => "need post\n" + end + end +end |