Open weteamsteve opened 5 years ago
Other comments:
It is in the create method of your controller where you will also instantiate a corresponding mailer object.
Create it in the members controller.
Pass in member object so we know the user and the squad. SO SICK OMG
Reference new Models page on Squadsnap/Wiki
{:member=>#<Member id: 2, user_id: 2, position: nil, number: nil, membership: "member", created_at: "2019-06-02 05:17:44", updated_at: "2019-06-02 05:18:05", squad_id: 1>}
Two hours and done! Biggest problem was understanding that member parameter was passed in as a hash, and had to access member in that hash then the object members.
Note: using app specific password for security on Google.
Reference issue 10 from squadsnap
Use ActionMailer to implement feature that emails squad owner when requesting membership to squad.
Reference Email Confirmation in Rails
rails g mailer request_membership membership