Я пытаюсь загрузить вид после некоторых действий в моем контроллере, я получаю сообщение, что был загружен вид, но вид никогда не показалиRails redirect_to не делает вид
Моего контроллера:
def getBalance
@result
accountId = params['accountId']
baseURLUpdate = 'http://xxxxxxxxxx' + accountId + '/statement'
transactionHash = generateTransactionHash(accountId)
@result = HTTParty.get(baseURLUpdate.to_str,
:headers => { 'Content-Type' => 'application/json',
'Api-Access-Key' => 'xxxxxxxx',
'Transaction-Hash' => transactionHash })
puts @result
redirect_to accounts_response_path(:result => @result)
return
end
Мои маршруты:
post 'accounts/getBalance', to: "accounts#getBalance"
get 'accounts/response', to: "accounts#responseShow"
Мой вид называется responseShow.html.erb, и у меня есть response.html.erb тоже.
Я получаю это:
Redirected to http://localhost:3000/accounts/response.html
Completed 302 Found in 409ms (ActiveRecord: 0.0ms)
Started GET "/accounts/response.html" for 127.0.0.1 at 2016-01-19 10:36:02 -0200
Processing by AccountsController#response_show as HTML
I'm here
Rendered accounts/response_show.html.erb within layouts/application (0.0ms)
Completed 200 OK in 18ms (Views: 17.2ms | ActiveRecord: 0.0ms)
удалить 'return' от действия –
Ваше мнение визуализируется как JS не HTML:' Обработка с помощью AccountsController # responseShow as JS' – psantos
Пожалуйста, напишите нам полный код контроллера. –