Skip to content

Instantly share code, notes, and snippets.

View ci.yml
version: 2
jobs:
deploy-job-staging:
docker:
- image: circleci/ruby
working_directory: ~/repo
steps:
- checkout
- add_ssh_keys:
fingerprints:
View braintree.slim
script src="https://js.braintreegateway.com/web/dropin/1.9.4/js/dropin.min.js"
javascript:
var form = document.querySelector('.payment');
var client_token = "#{component.client_token}";
braintree.dropin.create({
authorization: client_token,
container: '#bt-dropin',
paypal: {
View script_organisation.coffee
# ---------------------------------------------------------------
# Playground
class Playground
constructor: (playground) ->
@playground = $(playground)
@setEvents()
@getExamples()
View page.coffee
# ------------------------------------------------------
# Page
Page = {}
# ------------------------------------------------------
# Page App
View asger.rb
# in web_module.rb
field :attachment_id, type: BSON::ObjectId
def attachment
Attachment.find(attachment_id)
end
# then you can try
View Page.rb
class Page
include Mongoid::Document
include Mongoid::Timestamps
include Mongoid::Userstamp
include Mongoid::Slug
include MongoidVersioning::Versioned
include Mongoid::Ancestry
has_ancestry
# ---------------------------------------------------------------------