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 Survey < ActiveRecord::Base | |
| include Surveyor::Models::SurveyMethods | |
| include SurveyorExtension | |
| 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
| module SurveyorExtension | |
| extend ActiveSupport::Concern | |
| # add your instance methods here | |
| def foo | |
| "foo" | |
| end | |
| # add your static(class) methods here |
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 Survey < ActiveRecord::Base | |
| include Surveyor::Models::SurveyMethods | |
| def interactions | |
| return Interaction.where(:survey_id => self.id) | |
| end | |
| def title | |
| "Custom #{super}" | |
| 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
| Warning: PATH set to RVM ruby but GEM_HOME and/or GEM_PATH not set, see: | |
| https://github.com/wayneeseguin/rvm/issues/3212 | |
| Warning! PATH is not properly set up, $GEM_HOME is not set, | |
| usually this is caused by shell initialization files - check them for 'PATH=...' entries, | |
| it might also help to re-add RVM to your dotfiles: 'rvm get stable --auto-dotfiles', | |
| to fix temporarily in this shell session run: 'rvm use ruby-1.9.3-p392'. | |
| RVM is not a function, selecting rubies with 'rvm use ...' will not work. |
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
| {% extends "base.html" %} | |
| {% block content %} | |
| <head> | |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
| <meta charset="utf-8"> | |
| <title>CMPGN.IO WebPhone</title> | |
| <meta name="description" content=""> | |
| <meta name="author" content=""> |
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
| import balanced | |
| balanced.configure('ak-test-2eKlj1ZDfAcZSARMf3NMhBHywDej0avSY') | |
| card = balanced.Card( | |
| cvv='123', | |
| expiration_month='12', | |
| number='4444444444444448', | |
| expiration_year='2020' | |
| ).save() |
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
| data = {'merchant_uri': '/v1/marketplaces/1', | |
| 'api_key': 'ak-test', | |
| 'owner_email': '[email protected]', | |
| 'business_type': 'Ecommerce', | |
| 'full_name': 'Fat Amy', | |
| 'owner_phone_number': '12334567', | |
| 'marketplace_name': 'Test Marketplace', | |
| 'domain_url': 'aviato.com', | |
| 'support_email': '[email protected]', | |
| 'support_phone_number': '12334567', |
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 you want to wrap a WSGI app to record uncaught exceptions, Raven provides a middleware for that: | |
| from raven.middleware import Sentry | |
| application = Sentry(application, client=client) |
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
| INSTALLED_APPS = ( | |
| 'django.contrib.admin', | |
| 'django.contrib.auth', | |
| 'django.contrib.contenttypes', | |
| 'django.contrib.sessions', | |
| 'django.contrib.messages', | |
| 'django.contrib.staticfiles', | |
| 'corsheaders', | |
| 'gandalf', | |
| 'raven.contrib.django.raven_compat', |
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
| // Import the official balanced nodejs package | |
| var balanced = require('balanced-official'); | |
| // Create a new API Key and configure the client with it | |
| // The client automatically creates a new test marketplace for us | |
| // if a marketplace does not exist for the api key | |
| balanced.configure('ak-test-1xGEmbY58peQpnsgKEpgjuXgR1TjYdGpj'); | |
| // Create a customer with some dummmy data | |
| balanced.get('/debits/WDwXsVosniVmJBcxO7IfTFj').then(function(customer) { |