"undefined method `file' for #<String:0x007ffaf0049a28>" in Rails?
I'm getting an "undefined method `file' for #" file error when trying to display the content_type (ex. image/jpg) of a file. I'm using Carrierwave + Jquery File (both heavily modified to work together the way I want) + Amazon s3 (click this to see what I'm doing). It was working before with just carrierwave & amazon s3 but when I added the jquery file upload & direct s3, it's just not working any longer.
Can someone please help me out here? Here's what I'm doing -> <%= @post.attach.file.content_type %>
Thank you ahead of time & please let me know if you need more code/info
I'm getting an "undefined method `file' for #" file error when trying to display the content_type (ex. image/jpg) of a file. I'm using Carrierwave + Jquery File (both heavily modified to work together the way I want) + Amazon s3 (click this to see what I'm doing). It was working before with just carrierwave & amazon s3 but when I added the jquery file upload & direct s3, it's just not working any longer.
Can someone please help me out here? Here's what I'm doing -> <%= @post.attach.file.content_type %>
Thank you ahead of time & please let me know if you need more code/info
No comments:
Post a Comment