# Redirecting to uploaded files directory

**URL:** <https://www.ruby-forum.com/t/redirecting-to-uploaded-files-directory/150497>\
**Category:** Rails\
**Created:** [October 9, 2008, 6:51am UTC](https://www.ruby-forum.com/t/redirecting-to-uploaded-files-directory/150497 "2008-10-09T06:51:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/58f4c7/32.png) [@sal](https://www.ruby-forum.com/u/sal)\
**Post date:** [October 9, 2008, 6:51am UTC](https://www.ruby-forum.com/t/redirecting-to-uploaded-files-directory/150497/1 "2008-10-09T06:51:35Z")

</div>

All,

I’m running into a bit of a newb issue here. I’ve created an app with  
attachment\_fu which by default created a directory within public as  
“public/#{tablename}”. But now when I try and browse to my default  
action for that resource which is the same actionname as my tablename  
I get redirected to a file listing of that public/tablename  
directory… within my index view of that action I want to display the  
file I’ve uploaded but I cannot figure out why it’s redirectiing to  
the files directory attachment\_fu has uploaded the file to. not sure  
if this is a webserver (apache/passenger) or a rails routing issue…

hope that makes sense

can anyone please help?

thanks in advance

---

<div class="post-metadata">

**Author:** ![sal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/58f4c7/32.png) [@sal](https://www.ruby-forum.com/u/sal)\
**Post date:** [October 9, 2008, 7:22am UTC](https://www.ruby-forum.com/t/redirecting-to-uploaded-files-directory/150497/2 "2008-10-09T07:22:03Z")

</div>

ack!

I meant to type same controller name as the default directory  
attachment\_fu creates; I get a server listing of files instead of the  
index of that resource.

my bad.

any thoughts?
