Ruby on rails Rails 3通过*/*

Ruby on rails Rails 3通过*/*,ruby-on-rails,ruby,ruby-on-rails-3,Ruby On Rails,Ruby,Ruby On Rails 3,我注意到,在Rails 3.2.2中,所有操作都是以*/*格式处理的。所以问题是:什么是*/*?为什么默认情况下(每次)调用它 因为一个操作有两个处理: Started GET "/" for 127.0.0.1 at 2012-07-07 22:50:22 +0200 Processing by MainController#index as HTML Started GET "/" for 127.0.0.1 at 2012-07-07 22:50:22 +0200 Processing

我注意到,在Rails 3.2.2中,所有操作都是以
*/*
格式处理的。所以问题是:什么是
*/*
?为什么默认情况下(每次)调用它

因为一个操作有两个处理:

Started GET "/" for 127.0.0.1 at 2012-07-07 22:50:22 +0200
Processing by MainController#index as HTML

Started GET "/" for 127.0.0.1 at 2012-07-07 22:50:22 +0200
Processing by MainController#index as */*
我已尝试设置:

  respond_to :html

  def index
    @posts = Post.all
    respond_with(@posts)
  end
但同样的问题仍然存在


刚刚创建了基于Rails 3.2.6的项目。使用
Thin 1.4.1
Webrick
进行测试。同一问题:

=> Booting Thin
=> Rails 3.2.6 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
>> Thin web server (v1.4.1 codename Chromeo)
>> Maximum connections set to 1024
>> Listening on 0.0.0.0:3000, CTRL+C to stop

Started GET "/mains" for 127.0.0.1 at 2012-07-09 10:53:55 +0200
Connecting to database specified by database.yml
Processing by MainsController#index as HTML
  Main Load (0.1ms)  SELECT `mains`.* FROM `mains` 
  Rendered mains/index.html.erb within layouts/application (2.7ms)
Completed 200 OK in 97ms (Views: 51.6ms | ActiveRecord: 1.3ms)


Started GET "/mains" for 127.0.0.1 at 2012-07-09 10:53:55 +0200
Processing by MainsController#index as */*
  Main Load (0.1ms)  SELECT `mains`.* FROM `mains` 
  Rendered mains/index.html.erb within layouts/application (0.5ms)
Completed 200 OK in 10ms (Views: 8.6ms | ActiveRecord: 0.1ms)

这意味着任何东西,如localhost/users/index、localhost/posts/index等。您可以只设置根路由和控制器路由是的,看起来是这样,但是已经设置了根路径。我只是不明白为什么每次操作都会调用它?我注意到,如果你点击刷新,Internet Explorer喜欢这样做。不幸的是,刷新或简单过程也是如此,这就是Google Chrome。