Actually, I just found this workaround to a rails bug:
http://dev.rubyonrails.org/ticket/4635
On Oct 5, 6:56 pm, eggie5 <egg...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> It seems that my file data is being treating as a string or something.
> Has anybody been able to do a file post in an integration test?
>
> NoMethodError (undefined method `original_filename'' for
"#<File:
> 0x316c300>":String):
> /app/models/attachment.rb:21:in `file=''
> /vendor/rails/activerecord/lib/active_record/base.rb:1846:in
> `send''
> /vendor/rails/activerecord/lib/active_record/base.rb:1846:in
> `attributes=''
> /vendor/rails/activerecord/lib/active_record/base.rb:1845:in
> `each''
> /vendor/rails/activerecord/lib/active_record/base.rb:1845:in
> `attributes=''
> /vendor/rails/activerecord/lib/active_record/base.rb:1672:in
> `initialize''
> /app/models/attachment.rb:11:in `initialize''
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---