change @resource.confirmation_token to @token in app/views/devise/mailer/confirmation_instructions.html.erb