开发者

why does the map.root :controller => "welcome" wont work?

i have been trying to change the homepage of my app for over and hour and searched the net but cant find anything, i have map.root :controller => "welcome" set in the routes.rb file and i have deleted the index.html.erb file in public and http://0.0.0.0:3000/ still takes me开发者_JS百科 to the welcome to rails default page.

i have a welcome controller

class WelcomeController < ApplicationController
  layout 'general'

  def index
  end
end

and i have a index.html.erb file in the views/welcome directory but still wont work.

any ideas why?

thanks


It sounds like you need to delete public/index.html

Generally, an html file in public will take priority over a Rails route.


I restarted my laptop and it worked. i really dont know why that was a problem. but thanks for all the comments.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜