Closed Seberius closed 10 years ago
I saw that comma and even tried without it, but couldn’t get it to go.
The @appointment.service.service_description is actually a link to the service model, where the service description is held. I’ll double check the SMTP auth stuff.
From: Seberius [mailto:notifications@github.com] Sent: Sunday, April 27, 2014 10:06 PM To: veronicacannon/stylist Subject: [stylist] Fix for Appointment Mailer (#28)
There was an trailing comma on the defaults causing the error (like what @elskwidhttps://github.com/elskwid showed us yesterday). There were a couple other minor errors that showed up once that was fixed. The only notable one was in the mail templates, as @appointment.service.service_description isn't in the Appointment model (unless I messed up the database) so the call was changed to @appointment.service. The app will still fail on an appointment post, but is now failing on the smtp auth. I will try testing it with a mail server tomorrow.
You can merge this Pull Request by running
git pull https://github.com/veronicacannon/stylist fix-mailer
Or view, comment on, or merge it at:
https://github.com/veronicacannon/stylist/pull/28
Commit Summary
File Changes
Patch Links:
— Reply to this email directly or view it on GitHubhttps://github.com/veronicacannon/stylist/pull/28.
It works! I found an awesome gem called Letter Opener that will let you intercept the emails and display them in new tabs. The app redirects to the thank you page and both emails are displaying nicely, but iCalendar says it can't read the ics file. I will look into that tomorrow. To test smtp, change development.rb to config.action_mailer.delivery_method = :smtp .
The .ics file can now be read by iCalendar.
Nice fixes @Seberius!
Hi @Seberius (learning how to use the right names here :)
I like the popup tabs for the emails. I got two that were the same, both for the customer. Should one be for the stylist?
Also, the service description is showing the ID of the service object. We need to use the services table there to get service.description. I think it is @appointment.services.service_description
Thanks @elskwid!
Hey @veronicacannon , one email should have an ics attachment and be addressed to stylist@example.com. That is the stylist email. They currently have the same body as the to_stylist template is just a duplicate of the to_client one and will need to be changed.
I would like talk to you this afternoon at the dev meet about the services_description as I have a couple questions about how the models work. May be related to issue #25 .
There was an trailing comma on the defaults causing the error (like what @elskwid showed us yesterday). There were a couple other minor errors that showed up once that was fixed. The only notable one was in the mail templates, as @appointment.service.service_description isn't in the Appointment model (unless I messed up the database) so the call was changed to @appointment.service. The app will still fail on an appointment post, but is now failing on the smtp auth. I will try testing it with a mail server tomorrow.