source 'http://rubygems.org'
gem 'rails', '3.0.10'
# Essential
gem "devise"
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", |
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
{ | |
"id":"4e809a4d5412901074000038", | |
"title":"My published videos", | |
"order_by":"_id", | |
"order_direction":"desc", | |
"tags":["Published"], | |
"created_at":"2011-09-26T15:29:17Z", | |
"updated_at":"2011-10-13T14:05:30Z", | |
"account_id":"4e809a4d5412901074000152" | |
} |
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
[ | |
{ | |
"id": "4e809a4d5412901074000038", | |
"title": "My latest published videos", | |
"tags": ["Published"], | |
"order_by": "_id", | |
"order_direction": "desc", | |
"created_at": "2011-09-26T15:29:17Z", | |
"updated_at": "2011-10-13T14:05:30Z" | |
} |
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
<div class="container"> | |
<h1 class="player-title">[player-title]</h1> | |
<h2 class="video-title">[selected video-title]</h2> | |
<ul class="playlist-list [many/single - depending if there are many playlists assigned or not]"> | |
<!-- A list element will be created for every playlist assigned to the player --> | |
<li class="playlist-row [even/odd - alternating for zebra styling] [current - on the currently selected playlist]" data-playlist-id="[playlist-id]"> | |
<span class="title"><a href="#" onclick="[method-for-loading-playlist]">[playlist-title]</a></span> | |
</li> | |
<!-- the list ends with a 'last' li useful for clearing if you're using float for the playlist-rows --> | |
<li class="last"></li> |
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 | |
field :something, :type => String | |
has_many :children | |
after_create :create_child | |
private | |
def create_child | |
children.create | |
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
# Statement are seperated by line breaks | |
def my_method | |
"hello" | |
end | |
# You can put several statements on one line if... | |
def my_method; "hello"; end | |
# After an operator... | |
1 + |
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_child | |
private | |
def create_child | |
children.build | |
end | |
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
{ "count": 23 } |
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 | |
has_many :children | |
end | |
class Child | |
include Mongoid::Document | |
belongs_to :parent |