On 9 May 2012 17:15, Miguel A. <[email protected]> wrote:

> > Have you tried
> > attr_accessible :hphoto
> > rather than (or in addition to)
> > attr_accessible :hphoto_attributes
> > ?
>
> If i add to the Hphoto model:
> attr_accessible :hphoto, :hphoto_attributes
> the result is the same.
>
>
> If I also add to the Hotel model:
> attr_accessible :hphoto, :hphoto_attributes
> it says "unknown attribute: hphoto"
> if i take it out and leave just :hphoto_attributes, the error is still
> the original one.
>
>
Sorry, I misread your initial post.

OK, I'm guessing your form is sending some data in a :hphoto hash, rather
than a :hphoto_attributes hash. That would explain the inconsistency. Can
you post your form view please?



> --
> Posted via http://www.ruby-forum.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.
>
>

-- 
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