This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# TODO: include sessions | |
def remove_customer_pass(client_user_id, pass_customer_id, delete_pass_customer = false, expire_pass_customer = false) | |
user_client = User.find(client_user_id) | |
if user_client | |
pass_customer_classes = [] | |
customer_collection = nil | |
pass_customer = PassCustomer.find(pass_customer_id) | |
pass_applies_to = pass_customer.pass.pass_products.pluck(:applies_to) | |
talent = pass_customer.pass.user.talent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def create_backend_admin(admin_email, admin_pass) | |
admin_exist = Admin.find_by(email: admin_email) | |
if not admin_exist | |
admin = Admin.create({ | |
email: admin_email, | |
password: admin_pass, | |
password_confirmation: admin_pass, | |
}) | |
pp admin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://talent-hack.atlassian.net/browse/TAL-908 | |
client_email = 'brittanebates@gmail.com' | |
talent_email = 'hello@emimoves.com' | |
pass_title = 'Monthly Unlimited Virtual Classes - Reoccurring' | |
# References involved | |
client_user = User.find_by(email: client_email) | |
talent_user = User.find_by(email: talent_email) | |
pass = Pass.find_by(user_id: talent_user.id, title: pass_title) |
NewerOlder