Form_for w single resource

I wrote

form_for(:message, @message, :url => {user_messages_path} ) do |f|

to POST a form

in my routes, user is a single resource

map.resource :user, :controller => “users”, :member => {:network =>
:get} do |user|
user.resources :messages

end

POST /user/messages {:controller=>“messages”,
:action=>“create”} is the route I want to reach
but I get an error on the form_for

…/app/views/messages/new.html.erb:11: odd number list for Hash

what’s wrong ? seems OK to me according to the API… or Santa Claus
needs to bring me glasses ;-))

Kad :

I wrote

form_for(:message, @message, :url => {user_messages_path} ) do |f|

:url => user_messages_path

– Jean-François.

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