On Mon, Sep 20, 2010 at 2:56 PM, Abder-Rahman Ali <[email protected]> wrote:
> "photo" is originally a column field, but what does it mean when
> inserting it in this shape?
>
> params[:photo]['photo']
>
> If params[:photo] is telling us that we have a key :photo, what is the
> use of ['photo'], this is what I'm not getting.

It means there's another hash inside the params[:photo] hash.

params[:photo]
<input type="file" name="photo" />

params[:photo]['photo']
<input type="file" name="photo[photo]" />



-- 
Greg Donald
destiney.com | gregdonald.com

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to