Say I've got a standard new method in a controller:
def new
@doc = Doc.new
respond_to do |format|
format.html
format.json { render json: @doc }
end
end
How would I facilitate passing an argument through it, i.e.:
def new(i)
...
end
To permit me to write something like this in the view:
<%= link_to(e.name, new_doc_path(e.id)) %>
Cheers!