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
| /** | |
| * Think of this "main.js" file as your application bootstrap. | |
| */ | |
| import Vue from 'vue' | |
| import Resource from 'vue-resource' | |
| import VueRouter from 'vue-router' | |
| import routes from './routes' | |
| import middleware from './middleware' |
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
| //: Playground - noun: a place where people can play | |
| import UIKit | |
| var str = "Hello, playground" | |
| protocol ViewDelegate { | |
| var contentDelegate: AnyObject? { get set } | |
| var contentDataSource: AnyObject? { get set } | |
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
| public typealias JSONObject = [String: AnyObject] | |
| public typealias JSONArray = [String: AnyObject] | |
| public protocol MetaRecord {} | |
| public extension MetaRecord { | |
| public final static var modelName: String { | |
| let reflect = _reflect(self) | |
| var className = "\(reflect.summary)" | |
| if let typeRange = className.rangeOfString(".Type") { | |
| className.replaceRange(typeRange, with: "") |
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
| public extension String { | |
| public var pluralized: String { return StringInflector.sharedInstance.pluralize(self) } | |
| public var singularized: String { return StringInflector.sharedInstance.singularize(self) } | |
| } | |
| public class StringInflector { | |
| public struct Rule { | |
| public enum Form { | |
| case Singular | |
| case Plural |
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
| # A user session class, a simplified mix of the following code samples: | |
| # * https://github.com/blog/1661-modeling-your-app-s-user-session | |
| # * http://www.jonathanleighton.com/articles/2013/revocable-sessions-with-devise/ | |
| class Session < ActiveRecord::Base | |
| # Uncomment if you use Hobo Fields, else add these yourself | |
| # fields do | |
| # session_id :string, :index => true, :unique => true | |
| # accessed_at :datetime | |
| # user_ip :string |