# File\_colmn for many entries

**URL:** <https://www.ruby-forum.com/t/file-colmn-for-many-entries/127353>\
**Category:** Rails\
**Created:** [January 28, 2008, 3:20pm UTC](https://www.ruby-forum.com/t/file-colmn-for-many-entries/127353 "2008-01-28T15:20:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kaizerkaizer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/45deac/32.png) [@kaizerkaizer](https://www.ruby-forum.com/u/kaizerkaizer)\
**Post date:** [January 28, 2008, 3:20pm UTC](https://www.ruby-forum.com/t/file-colmn-for-many-entries/127353/1 "2008-01-28T15:20:00Z")

</div>

I’ve sucessfully created an upload and view for one picture connected to  
current\_user, but who am I suppose to create MANY pictures to one user?

I thought I basically could rename everything to “entries” and “images”  
which once were called “entry” or “image”.

change the controller:  
entry\_controller ===\> entries\_controller

the USER model:  
has\_one :entry ===\> has\_many :entries

all the folders containing entry ===\> entries

the “routes”-file with with the correct paths  
the folders in the public directory to Entries and Images

(but not change the ENTRY-model name)

Well, this doesn’t work.  
I recieve a multitude of errors  
like ‘image\_relative\_path’ for Entry:Class

I guess I’m doing this all wrong, so any help is welcome.

---

<div class="post-metadata">

**Author:** ![kaizerkaizer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/45deac/32.png) [@kaizerkaizer](https://www.ruby-forum.com/u/kaizerkaizer)\
**Post date:** [January 29, 2008, 2:06pm UTC](https://www.ruby-forum.com/t/file-colmn-for-many-entries/127353/2 "2008-01-29T14:06:51Z")

</div>

I’m rephrasing my question,

(as I wrote before)I’ve sucessfully created an upload and view for one  
picture connected to current\_user, but who am I suppose to create MANY  
pictures to one user?

I’m well aware that the models need to have “has\_many” and “belongs\_to”  
and these are right. but with only “has\_many :entries” (and belongs\_to  
:user) I recieve “unkown method entry”.

However, one problem might be that I haven’t quite understood “how to  
know where” to write “entry” and where to write “entries” in the code.  
(even though I thought this just should be dependent on the “has\_many”  
in the model).

So I’ve tried a couple of diffrent ways to figure out where they should  
be called “entries” and “entry”, but more than it results in  
“‘image\_relative\_path’ for Entry:Class”

pretty please help me
