This file contains 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>React Base</title> | |
<script src="https://fb.me/react-0.13.2.js"></script> | |
<script src="https://fb.me/JSXTransformer-0.13.2.js"></script> | |
<script src="https://code.jquery.com/jquery-2.1.3.min.js"></script> | |
</head> | |
<body> |
This file contains 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Traversals</title> | |
<script src="https://code.jquery.com/jquery-2.1.3.js"></script> | |
</head> | |
<body> | |
<div id="main"> | |
<ul id="myList"> |
This file contains 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
h1 { | |
color: #ffee00; | |
font-weight: bold; | |
font-size: 28px; | |
} | |
#content { | |
margin: 20px; | |
color: #e0e0e0; | |
} |
This file contains 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 is an HTML comment --> | |
<div id="main"> | |
<div id="top_list"> | |
<ul class="home_ul"> | |
<li> This is list </li> | |
<li> This is second item on a list </li> | |
</ul> | |
</div> <!-- end div top --> | |
<div id="bottom_images"> | |
<img src="images/image1.png" alt="First image" /> |
This file contains 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
user = User.find(1) | |
user.reviews.average(:rating) |
This file contains 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 User < ActiveRecord::Base | |
acts_as_token_authenticatable | |
# Include default devise modules. Others available are: | |
# :confirmable, :lockable, :timeoutable and :omniauthable | |
devise :database_authenticatable, :registerable, | |
:recoverable, :rememberable, :trackable, :validatable | |
This file contains 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
# VideoVersion object | |
# Each video is made up of different versions (resolutions/bitrates) | |
# | |
# Author:: Daniel J. Ballenger <dballenger@denetron.com> | |
# Copyright:: Copyright 2011 Daniel J. Ballenger | |
# = Sample XML Output | |
# <version> | |
# <created_at type="datetime"> | |
# 2011-05-25T00:35:31Z |
This file contains 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 Factories::CheckIn | |
def initialize(options = {}) | |
@options = options || {} | |
end | |
def create(attributes) | |
build(nil, attributes).tap do |check_in| | |
validate_user_schedule_existance(check_in) | |
validate_check_in_date(check_in) if @options[:fastpass] |