ActionController::RoutingError

plz give me the solution to solve the below error

ActionController::RoutingError

ActionController::RoutingError in Issues#new
Showing app/views/issues/_issue.rhtml where line #1 raised:

issue_url failed to generate from {:controller=>“issues”,
:action=>“show”, :id=>nil}, expected: {:controller=>“issues”,
:action=>“show”}, diff: {:id=>nil}

Extracted source (around line #1):

1: <% form_for :issue, :url=>issue_path(@issue), :html => {:class =>
‘horizontal’, :multipart => true, :method => ( @issue.new_record? ?
:post : :put )} do |form| %>
2:
3: <%= error_messages_for ‘issue’ %>
4:

Trace of template inclusion: /app/views/issues/new.rhtml

RAILS_ROOT: ./script/…/config/…

issue_url failed to generate from {:controller=>“issues”,
:action=>“show”, :id=>nil}, expected: {:controller=>“issues”,
:action=>“show”}, diff: {:id=>nil}

Is at @issue nil? You could test the url generation with
issue_path(1), for example, where “1” is a valid id for an issue
object.

hth

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