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 Parent | |
| include Mongoid::Document | |
| embeds_many :children | |
| before_create :create_children | |
| before_destroy :destroy_children | |
| private | |
| def create_children | |
| 3.times { children.build } | |
| 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
| require "streamio" | |
| # Configure it | |
| Streamio.configure do |config| | |
| config.username = "your_account_name" | |
| config.password = "your_api_private_key" | |
| end | |
| # Create a Video | |
| video = Streamio::Video.create :file => File.new("path/to/an/awesome.movie") |
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
| { | |
| "aspect_ratio_multiplier":1.7777777777777777, | |
| "created_at":"2011-02-09T16:13:41Z", | |
| "duration":21.9, | |
| "plays":34, | |
| "progress":1.0, | |
| "state":"ready", | |
| "tags": ["Teaser", "System-Demo"], | |
| "title":"Streamio 20th Century Fox Teaser", | |
| "updated_at":"2011-02-10T14:37:52Z", |
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
| [ | |
| { | |
| "account_id":"4c57f3975412901427000005", | |
| "tags":["Community"], | |
| "title":"SpringCampaign", | |
| "id":"4dc938f154129008fe000002" | |
| } | |
| ] |
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
| { | |
| "account_id":"4c57f3975412901427000005", | |
| "tags":["Community"], | |
| "title":"SpringCampaign", | |
| "id":"4dc938f154129008fe000002" | |
| } |
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 Payex | |
| mattr_accessor :account_number | |
| mattr_accessor :encryption_key | |
| MD5_CHECK_FIELDS = { | |
| "pxorder/pxorder.asmx/Initialize7" => [:accountNumber, :purchaseOperation, :price, :priceArgList, :currency, :vat, :orderID, :productNumber, :description, :clientIPAddress, :clientIdentifier, :additionalValues, :externalID, :returnUrl, :view, :agreementRef, :cancelUrl, :clientLanguage], | |
| "pxagreement/pxagreement.asmx/CreateAgreement3" => [:accountNumber, :merchantRef, :description, :purchaseOperation, :maxAmount, :notifyUrl, :startDate, :stopDate], | |
| "pxagreement/pxagreement.asmx/DeleteAgreement" => [:accountNumber, :agreementRef], | |
| "pxorder/pxorder.asmx/Complete" => [:accountNumber, :orderRef], | |
| "pxagreement/pxagreement.asmx/AutoPay2" => [:accountNumber, :agreementRef, :price, :productNumber, :description, :orderId, :purchaseOperation], |
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 Account | |
| include Mongoid::Document | |
| embeds_many :memberships | |
| field :name, :type => String | |
| validates_presence_of :name | |
| 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 Account | |
| include Mongoid::Document | |
| references_many :videos | |
| end | |
| class Video | |
| include Mongoid::Document | |
| referenced_in :account |
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
| source 'http://rubygems.org' | |
| gem 'rails' | |
| # Essential | |
| gem "devise" | |
| gem 'bson_ext' | |
| gem 'mongoid', ">= 2.0.0.beta" | |
| gem 'mongoid_grid', :require => "mongoid/grid" | |
| gem 'SystemTimer' |
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
| sv: | |
| formtastic: | |
| :yes: Ja | |
| :no: Nej | |
| create: Skapa | |
| save: Spara | |
| submit: Skicka | |
| required: Obligatorisk |