Sending object as a variable to Mandrill via Rails
问题 I'm converting an email template from Rails to Mandrill, the content for which requires a fair amount of data, some of which is nested through several associations. Therefore, I'd like to pass objects via Mandrill's global_merge_vars, such as the (simplified) following: [{ 'name'=>'order', 'content'=> @order.to_json(include: { user: { only: :first_name } }, methods: [:method1, :method2, :method3, :method4]) }] Which passes through to the mandrill template under the order variable similar to