This is really throwing me for a loop.
ON DEV
---
Processing ApplicationsController#update (for 127.0.0.1 at 2011-02-10
18:10:32) [PUT]
Parameters: {"commit"=>"Submit application",
"authenticity_token"=>"NkkrbsM5+iaycHgBvBi5OuMBTFSGF1/wd4We1ka5Mvg=",
"id"=>"5", "application"=>{"resume_attributes"=>{"id"=>"5",
"document"=>#<File:/var/folders/Kk/KkqihWLOGUOFhCVLrqy2Z++++TM/-Tmp-/
RackMultipart20110210-42571-sy4dyx-0>}, "phone_number"=>"4156326001",
"last_name"=>"Schofield", "no_phone"=>"0", "cover_blurb"=>"",
"email"=>"[email protected]", "first_name"=>"Curt"}, "job_id"=>"3"}
User Load (0.8ms) SELECT * FROM "users" WHERE ("users"."id" = 1)
LIMIT 1
Job Load (0.4ms) SELECT * FROM "jobs" WHERE ("jobs"."id" = 3)
Application Load (0.5ms) SELECT * FROM "applications" WHERE
("applications"."id" = 5)
Resume Load (1.2ms) SELECT * FROM "resumes" WHERE
("resumes".application_id = 5) LIMIT 1
SQL (0.1ms) BEGIN
********
Tempfile
********
Tempfile
--------
Tempfile
--------
-----
ON PRODUCTION
Processing ApplicationsController#update (for 24.6.41.107 at
2011-02-10 18:05:50) [PUT]
Parameters: {"commit"=>"Submit application",
"authenticity_token"=>"RrBr2RJRwKzfpXmVLwGZJDxG+69SFS1UPCGA1/mZGyI=",
"id"=>"3149", "application"=>{"resume_attributes"=>{"id"=>"3149",
"document"=>#<File:/app/68560ec3-8532-4263-8bf5-d383ec041143/home/tmp/
RackMultipart20110210-24058-sxv5gd-0>}, "phone_number"=>"1441121123",
"last_name"=>"Schofield", "no_phone"=>"0", "cover_blurb"=>"",
"email"=>"[email protected]", "first_name"=>"Curtis"}, "job_id"=>"46"}
User Load (9.8ms) SELECT * FROM "users" WHERE ("users"."id" = 7)
LIMIT 1
Job Load (2.4ms) SELECT * FROM "jobs" WHERE ("jobs"."id" = 46)
Application Load (2.9ms) SELECT * FROM "applications" WHERE
("applications"."id" = 3149)
Resume Load (69.8ms) SELECT * FROM "resumes" WHERE
("resumes".application_id = 3149) LIMIT 1
SQL (16.3ms) BEGIN
********
String
********
String
--------
the code
(before save)
def finalize_document
unless self.document.is_a? String
Rails.logger.info read_attribute(:document).class
Rails.logger.info "-"*8
file = read_attribute(:document)
file.rewind # In case #resume= is ever called twice
self.write_attribute(:document, file.read)
self.content_type = file.content_type.try(:chomp) || 'unknown/
text'
self.original_filename=file.original_filename
....
--
You received this message because you are subscribed to the Google Groups
"Heroku" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/heroku?hl=en.