<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Hiding attachment_fu from your controllers</title>
	<atom:link href="http://upstream-berlin.com/2008/04/21/hiding-attachment_fu-from-your-controllers/feed/" rel="self" type="application/rss+xml" />
	<link>http://upstream-berlin.com/2008/04/21/hiding-attachment_fu-from-your-controllers/</link>
	<description></description>
	<pubDate>Fri, 09 Jan 2009 13:23:54 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.1</generator>
		<item>
		<title>By: Brock</title>
		<link>http://upstream-berlin.com/2008/04/21/hiding-attachment_fu-from-your-controllers/#comment-43975</link>
		<dc:creator>Brock</dc:creator>
		<pubDate>Tue, 06 Jan 2009 16:26:33 +0000</pubDate>
		<guid isPermaLink="false">http://upstream-berlin.com/blog/2008/04/21/hiding-attachment_fu-from-your-controllers/#comment-43975</guid>
		<description>Ha!  Too easy.  Thanks again!</description>
		<content:encoded><![CDATA[<p>Ha!  Too easy.  Thanks again!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alexander Lang</title>
		<link>http://upstream-berlin.com/2008/04/21/hiding-attachment_fu-from-your-controllers/#comment-43883</link>
		<dc:creator>Alexander Lang</dc:creator>
		<pubDate>Mon, 05 Jan 2009 09:46:18 +0000</pubDate>
		<guid isPermaLink="false">http://upstream-berlin.com/blog/2008/04/21/hiding-attachment_fu-from-your-controllers/#comment-43883</guid>
		<description>you should be able to do a validates_associated :project_photo in your project model which will validate the photo within the project model.</description>
		<content:encoded><![CDATA[<p>you should be able to do a validates_associated :project_photo in your project model which will validate the photo within the project model.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brock</title>
		<link>http://upstream-berlin.com/2008/04/21/hiding-attachment_fu-from-your-controllers/#comment-43873</link>
		<dc:creator>Brock</dc:creator>
		<pubDate>Mon, 05 Jan 2009 05:16:24 +0000</pubDate>
		<guid isPermaLink="false">http://upstream-berlin.com/blog/2008/04/21/hiding-attachment_fu-from-your-controllers/#comment-43873</guid>
		<description>It does work great, thank you!  Thank you!  Thank you!

But (and isn't there always a but?) save errors from build_project_photo don't get returned to the controller.  Do you have any ideas on how to get those errors so it isn't a surprise later when I evaluate project_photo.public_filename ?</description>
		<content:encoded><![CDATA[<p>It does work great, thank you!  Thank you!  Thank you!</p>
<p>But (and isn&#8217;t there always a but?) save errors from build_project_photo don&#8217;t get returned to the controller.  Do you have any ideas on how to get those errors so it isn&#8217;t a surprise later when I evaluate project_photo.public_filename ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cher</title>
		<link>http://upstream-berlin.com/2008/04/21/hiding-attachment_fu-from-your-controllers/#comment-42357</link>
		<dc:creator>Cher</dc:creator>
		<pubDate>Sat, 06 Dec 2008 15:11:15 +0000</pubDate>
		<guid isPermaLink="false">http://upstream-berlin.com/blog/2008/04/21/hiding-attachment_fu-from-your-controllers/#comment-42357</guid>
		<description>Oh man, I'm an idiot. I used my model instead of :photo for photo... never try new things at 3 am. :)

Thanks for the great tutorial. Works beautifully :)</description>
		<content:encoded><![CDATA[<p>Oh man, I&#8217;m an idiot. I used my model instead of :photo for photo&#8230; never try new things at 3 am. <img src='http://upstream-berlin.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Thanks for the great tutorial. Works beautifully <img src='http://upstream-berlin.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cher</title>
		<link>http://upstream-berlin.com/2008/04/21/hiding-attachment_fu-from-your-controllers/#comment-42354</link>
		<dc:creator>Cher</dc:creator>
		<pubDate>Sat, 06 Dec 2008 14:39:21 +0000</pubDate>
		<guid isPermaLink="false">http://upstream-berlin.com/blog/2008/04/21/hiding-attachment_fu-from-your-controllers/#comment-42354</guid>
		<description>That was my initial thought as well, that I had forgotten to use multipart encoding, but I do have that snippet in my form, and I checked the html output, and it's definitely there. 

Here is my error: 

/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/attribute_methods.rb:205:in `method_missing'
vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu.rb:295:in `uploaded_data='
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/base.rb:2117:in `send'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/base.rb:2117:in `attributes='
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/base.rb:2116:in `each'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/base.rb:2116:in `attributes='
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/base.rb:1926:in `initialize'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/associations/has_one_association.rb:18:in `new'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/associations/has_one_association.rb:18:in `build'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/associations/has_one_association.rb:83:in `new_record'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/base.rb:1693:in `with_scope'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/associations/has_one_association.rb:83:in `send'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/associations/has_one_association.rb:83:in `new_record'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/associations/has_one_association.rb:18:in `build'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/associations.rb:1114:in `send'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/associations.rb:1114:in `build_picture'
app/models/project.rb:7:in `picture='
app/models/project.rb:7:in `picture='
app/controllers/projects_controller.rb:6:in `new'
app/controllers/projects_controller.rb:6:in `create'</description>
		<content:encoded><![CDATA[<p>That was my initial thought as well, that I had forgotten to use multipart encoding, but I do have that snippet in my form, and I checked the html output, and it&#8217;s definitely there. </p>
<p>Here is my error: </p>
<p>/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/attribute_methods.rb:205:in `method_missing&#8217;<br />
vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu.rb:295:in `uploaded_data=&#8217;<br />
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/base.rb:2117:in `send&#8217;<br />
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/base.rb:2117:in `attributes=&#8217;<br />
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/base.rb:2116:in `each&#8217;<br />
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/base.rb:2116:in `attributes=&#8217;<br />
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/base.rb:1926:in `initialize&#8217;<br />
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/associations/has_one_association.rb:18:in `new&#8217;<br />
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/associations/has_one_association.rb:18:in `build&#8217;<br />
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/associations/has_one_association.rb:83:in `new_record&#8217;<br />
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/base.rb:1693:in `with_scope&#8217;<br />
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/associations/has_one_association.rb:83:in `send&#8217;<br />
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/associations/has_one_association.rb:83:in `new_record&#8217;<br />
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/associations/has_one_association.rb:18:in `build&#8217;<br />
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/associations.rb:1114:in `send&#8217;<br />
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/associations.rb:1114:in `build_picture&#8217;<br />
app/models/project.rb:7:in `picture=&#8217;<br />
app/models/project.rb:7:in `picture=&#8217;<br />
app/controllers/projects_controller.rb:6:in `new&#8217;<br />
app/controllers/projects_controller.rb:6:in `create&#8217;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: alex</title>
		<link>http://upstream-berlin.com/2008/04/21/hiding-attachment_fu-from-your-controllers/#comment-42345</link>
		<dc:creator>alex</dc:creator>
		<pubDate>Sat, 06 Dec 2008 11:34:38 +0000</pubDate>
		<guid isPermaLink="false">http://upstream-berlin.com/blog/2008/04/21/hiding-attachment_fu-from-your-controllers/#comment-42345</guid>
		<description>not sure but are you sure your form is using multipart encoding for file uploads? (form_for ... :html =&#62; {:multipart =&#62; true})</description>
		<content:encoded><![CDATA[<p>not sure but are you sure your form is using multipart encoding for file uploads? (form_for &#8230; :html =&gt; {:multipart =&gt; true})</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cher</title>
		<link>http://upstream-berlin.com/2008/04/21/hiding-attachment_fu-from-your-controllers/#comment-42303</link>
		<dc:creator>Cher</dc:creator>
		<pubDate>Fri, 05 Dec 2008 19:26:45 +0000</pubDate>
		<guid isPermaLink="false">http://upstream-berlin.com/blog/2008/04/21/hiding-attachment_fu-from-your-controllers/#comment-42303</guid>
		<description>I am attempting to use this method, however using the code you've given I get the following error:

undefined method `original_filename' for #

I have googled, but my findings haven't really helped me. Is there something else I need to do not shown here?</description>
		<content:encoded><![CDATA[<p>I am attempting to use this method, however using the code you&#8217;ve given I get the following error:</p>
<p>undefined method `original_filename&#8217; for #</p>
<p>I have googled, but my findings haven&#8217;t really helped me. Is there something else I need to do not shown here?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
