# Responds\_to\_parent

**URL:** <https://www.ruby-forum.com/t/responds-to-parent/145045>\
**Category:** Rails\
**Created:** [August 5, 2008, 3:31pm UTC](https://www.ruby-forum.com/t/responds-to-parent/145045 "2008-08-05T15:31:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![valeno](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/b487fb/32.png) [@valeno](https://www.ruby-forum.com/u/valeno)\
**Post date:** [August 5, 2008, 3:31pm UTC](https://www.ruby-forum.com/t/responds-to-parent/145045/1 "2008-08-05T15:31:12Z")

</div>

I use responds\_to\_parent plugin I don’t want to connect uploaded file  
with any model. I want to save uploaded file just in server\_dir.  
How does the controller look like?

---

<div class="post-metadata">

**Author:** ![valeno](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/b487fb/32.png) [@valeno](https://www.ruby-forum.com/u/valeno)\
**Post date:** [August 5, 2008, 5:49pm UTC](https://www.ruby-forum.com/t/responds-to-parent/145045/2 "2008-08-05T17:49:52Z")

</div>

On 05 Aug 2008, at 15:31, Val Onish wrote:

> I use responds\_to\_parent plugin I don’t want to connect uploaded file  
> with any model. I want to save uploaded file just in server\_dir.  
> How does the controller look like?

Instead of violating the skinny controller, fat model MVC principe,  
make a non-ActiveRecord model (a pure Ruby one that doesn’t save to  
the database) and implement file storage in that model. For code on  
how to store file uploads in the file system, check the plugin code  
for Paperclip and/or attachment\_fu and search via google (“rails file  
uploads” gives so much hits if it were physical ones, you wouldn’t be  
knocked out and your face would be totally smashed).

Best regards

Peter De Berdt
