【新手问题】Rendered之后页面不跳转
ruby吧
全部回复
仅看楼主
level 1
没有报错,数据库也查出东西了。
def show
@imprint = Imprint.find(params[:id])
end
Started GET "/imprints/23" for 127.0.0.1 at 2016-01-27 10:17:21 +0800
Processing by ImprintsController#show as */*
Parameters: {"id"=>"23"}
Imprint Load (0.7ms) SELECT `imprints`.* FROM `imprints` WHERE `imprints`.`id` = 23 LIMIT 1
Rendered imprints/show.html.erb within layouts/application (1.0ms)
Completed 200 OK in 48ms (Views: 45.6ms | ActiveRecord: 0.7ms)
2016年01月27日 02点01分 1
level 12
$ less app/controllers/welcome_controller.rb
class WelcomeController < ApplicationController
def index
end
end
$ ./bin/rake routes
Prefix Verb URI Pattern Controller#Action
welcome_index GET /welcome/index(.:format) welcome#index
$ curl localhost:3000/welcome/index
Started GET "/welcome/index" for 127.0.0.1 at 2016-01-28 08:31:37 +0800
Processing by WelcomeController#index as */*
Rendered welcome/index.html.erb within layouts/application (0.4ms)
Completed 200 OK in 2452ms (Views: 2451.5ms | ActiveRecord: 0.0ms)
2016年01月28日 00点01分 2
level 1
解决了,谢谢。
2016年01月28日 03点01分 3
1