hi, can anyone help me. i want to create an url to invoke  create action
of a controller. routes.rb has the routes. But i am getting error at
line 23. i have @user variable.

user_contact_path(@user.id)
I want generate url as : users/3/contacts to invoke contacts
controller's create action


---------------------------------------------------------------------------------

ActionController::RoutingError in Contacts#index

Showing app/views/contacts/index.html.haml where line #23 raised:

user_contact_url failed to generate from {:controller=>"contacts",
:user_id=>2, :action=>"show"}, expected: {:controller=>"contacts",
:action=>"show"}, diff: {:user_id=>2}

Extracted source (around line #23):

20:         %p  or
21:         %p Upload a vCard file to import people into your account.
22:         %p
23:           - form_tag(user_contact_path(@user.id), :method => "post")
do
24:             = file_field_tag "file"
25:             = submit_tag
26:     .span_2
--------------------------------------------------------------------------------

thank you,
aashish
-- 
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.

Reply via email to