Weird Rails URL issue when rendering a new action
- by Tony
I am rendering a new action but somehow getting the "index" URL. To be more specific, my create action looks like this:
class ListingsController < ApplicationController
def create
@listing = Listing.new(params[:listing])
@listing.user = @current_user
if @listing.save
redirect_to @listing
else
…