このルートをリクエストすると、次のエラーが発生します。direct_appointment_url(@appointment.uuid, :subdomain => @user.name)
direct_appointment_url(@appointment.uuid, :subdomain => @user.name)
TypeError: can't convert Array to String
from ...rvm/gems/ruby-1.9.3-p362@example/gems/actionpack-3.2.12/lib/action_dispatch/http/url.rb:55:in `match'
ルートは次のように定義されます。get "/appointment/:uuid" => "schedule#appointment", as: "direct_appointment"
ルートマッチャーに渡される2つの変数の値は次のとおりです。
appointment.uuid => "a52aff80-5b83-0130-987f-0026080ebf68"
と
@user.name => "example"
その他のコンテキスト:
ActionView::Template::Error (can't convert Array to String):
13: Message: <%= @appointment.client_message %>
14: <% end %>
15:
16: View online: <%= direct_appointment_url(@appointment.uuid, :subdomain => @user.name) %>
17:
18: To see your latest appointments, login at: <%= @login_url %>
19: Your username is: <%= @user.email %>
app/views/user_mailer/new_appointment_email.text.erb:16:in `_app_views_user_mailer_new_appointment_email_text_erb__686277782469675039_70200502266100'
app/mailers/user_mailer.rb:13:in `block in new_appointment_email'
app/mailers/user_mailer.rb:12:in `new_appointment_email'
app/controllers/appointments_controller.rb:43:in `block in create'
app/controllers/appointments_controller.rb:42:in `create'