-
Notifications
You must be signed in to change notification settings - Fork 1
[User Story] Plus 1 ticketing
rubyku edited this page Jan 15, 2013
·
1 revision
Ruby selects 2 tickets on course page
- Add drop down to course page
Ruby buys 2 tickets to the class
- To create a role we need a valid user
- We have no email, or any identifying info
- class User def invitee? self.status == "invitee" end
- Change all validations to use unless: :invitee?
Class now has 2 new students (Ruby + guest)
- Add logic to current Role#create controller to create 2 roles, one for invitee and one for use,
- Add inviter_id to role
Site confirms 2 tickets have been bought
- email confirmation to inviter
- course#show shows Ruby + # of guest
If person purchased multiple tickets => New Controller (User::Invite#new)
- shows a form so Ruby has the option to invite a friend by entering their name and email (1 form per guest ticket)
- @roles.each do |role| <%= form_for role.user ...
If Ruby enters guest's emails and names
- User::Invite#create with names and emails of people
- Users from the database get updated with name and email
- We need a new controller/views to send out emails
- We have a user with an invite token
- Invited user gets email with link
- Emails need to have token
- User.where(:status => "invite", :invite_token => params[:invite_token])
- Invited person gets CUSTOM LANDING PAGE!!!!!!!!!!!!
When user comes claim the ticket:
- if new user: User signs up with new password, needs to update user record (change status from invitee to claimed)
- if already logged in, needs to update the role on course page to point to the correct user and delete the temp user
- existing user but not already logged in, they log in and goto #2
Send Invited person to page showing their course: Course#show add text saying "YAY!!!!!!! U ROCKS TOTALLY"
Inviter gets email telling them that user /users/23 has accepted (link to user account)