Responds_to_parent

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?

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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs