خرید بک لینک

Vote count: 0

There must be an obvious answer to this, but I'm at a loss.

I have a Rails app which tracks sites. For whatever reason, localhost:3000/sites leads to my index page. However, localhost:3000/sites/index leads to my show page.

Why is this?

Below is the routes file:

Rails.application.routes.draw do

  resources :sites

Below is the sites controller:

class SitesController < ApplicationController

  def index
  end

  def show
  end

end

In views/sites, there is the index.html.erb and show.html.erb files. The former displays at /sites, the latter displays at /sites/index (and /sites/show as one would expect).

Thanks for any help!

asked 48 secs ago

برچسب: نویسنده: استخدام کار تاريخ: جمعه 1 مرداد 1395 ساعت: 4:08

صفحه بندی