This file contains hidden or 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
| class Faculty < ApplicationRecord | |
| has_many :faculty_specializations | |
| has_many :specializations, through: :faculty_specializations | |
| extend FriendlyId | |
| friendly_id :meta_slug, use: :slugged | |
| has_one_attached :profile | |
| end |
This file contains hidden or 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
| // This file is automatically compiled by Webpack, along with any other files | |
| // present in this directory. You're encouraged to place your actual application logic in | |
| // a relevant structure within app/javascript and only use these pack files to reference | |
| // that code so it'll be compiled. | |
| require("@rails/ujs").start() | |
| require("turbolinks").start() | |
| require("@rails/activestorage").start() | |
| require("channels") | |
| require('jquery') |
This file contains hidden or 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
| <% if @message == 'success' %> | |
| $(location).attr('href', '/thank-you'); | |
| <% else %> | |
| $(".outcome-status").hide(); | |
| $("#poker_button").attr("disabled", false); | |
| $("#poker_button").html('Donate'); | |
| $("#poker_button").css('background-color', '#293B57'); | |
| $(".outcome").append("<div class='outcome-status alert alert-danger'> <%= @failure_message %><div>") | |
| <% end %> |
This file contains hidden or 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
| class DonationsController < ApplicationController | |
| def new | |
| end | |
| def create | |
| amount = CorrectMoneyService.new(params[:amount]).call | |
| @current_user = FindMemberService.new(params).call | |
| session[:user_id] = @current_user.id | |
| #begin | |
| AttachPaymentMethodService.new(@current_user.stripe_id, params[:cc]).call |
This file contains hidden or 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
| = form_tag donations_path, id: "payment-form", remote: true do | |
| %h5.uppercase.mt-5 | |
| %strong Credit Card information | |
| %hr | |
| .row | |
| .col-md-4 | |
| %label | |
| Card number | |
| #card-number-element.field.form-control | |
| .col-md-4 |
This file contains hidden or 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
| Uncaught (in promise) ReferenceError: card is not defined | |
| at new:565 |
This file contains hidden or 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
| class DonationsController < ApplicationController | |
| def new | |
| end | |
| def create_payment_intent | |
| amount = CorrectMoneyService.new("$400.00").call | |
| intent = Stripe::PaymentIntent.create({ | |
| amount: amount, | |
| currency: 'usd', | |
| }) |
This file contains hidden or 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
| var form = document.getElementById('payment-form'); | |
| form.addEventListener('submit', function(event) { | |
| event.preventDefault(); | |
| if ($('#amount').not(':empty')){ | |
| $("#poker_button").attr("disabled", true); | |
| $("#poker_button").html('We are processing your donation, please wait'); | |
| $("#poker_button").css('background-color', '#28a745'); | |
| }; | |
| var response = fetch('/donations/create_payment_intent') |
This file contains hidden or 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
| function stripetokenhandler(token) { | |
| // insert the token id into the form so it gets submitted to the server | |
| var form = document.getelementbyid('payment-form'); | |
| var hiddeninput = document.createelement('input'); | |
| hiddeninput.setattribute('type', 'hidden'); | |
| hiddeninput.setattribute('name', 'stripetoken'); | |
| hiddeninput.setattribute('value', token.id); | |
| form.appendchild(hiddeninput); | |
| // submit the form |
This file contains hidden or 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://blueskybio.com/store/register/?update=yes&back=?update=yes&back=?update=yes&back=?update=yes&back=?update=yes&back=?update=yes&back=?update=yes&back=?update=yes&back=?update=yes&back=?update=yes&back=?update=yes&back=?update=yes&back=?update=yes&back=?update=yes&back=?update=yes&back=?update=yes&back=?update=yes&back=?update=yes&back=?update=yes&back=?update=yes&back=?update=yes&back=?update=yes&back=?update=yes&back=?update=yes&back=?update=yes&back=?update=yes&back=?update=yes&back=?update=yes&back=?update=yes&back=?update=yes&back=?update=yes&back=?update=yes&back=?update=yes&back=?update=yes&back=?update=yes&back=?update=yes&back=?update=yes&back=?update=yes&back=?update=yes&back=?update=yes&back=?update=yes&back=?update=yes&back=?update=yes&back=?update=yes&back=?update=yes&back=?update=yes&back=?update=yes&back=?update=yes&back=?update=yes&back=?update=yes&back=?update=yes&back=?update=yes&back=?update=yes&back=?update=yes&back=?update=yes&back=?update=yes&back=?update=yes&back=?update=yes&back= |