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
App.Router.map -> | |
@resource "documents", -> | |
@resource "document", | |
path: "/:document_slug/:document_id" |
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
possible_answer_values = [] | |
record.possible_answers.each do |p| | |
possible_answer_values.push(p.value) | |
end | |
if record.possible_answers.length != possible_answer_values.uniq.length | |
record.errors[:possible_answers] << "Question contains matching possible answers." | |
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
# config/routes.rb | |
Rails.application.routes.draw do | |
resources :responders, except: [:new, :edit, :destroy], defaults: { format: :json } | |
resources :emergencies, except: [:new, :edit, :destroy], defaults: { format: :json } | |
match '*path', to: 'application#render_404', as: :render_404, via: :all | |
end | |
# app/controllers/emergency_controller.rb | |
class EmergenciesController < ApplicationController |
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
@import url(http://fonts.googleapis.com/css?family=Oswald:400,300); | |
h2, h3 { | |
font-family: 'Oswald', sans-serif; | |
font-weight: 300; | |
color: #272F32; | |
} | |
/* Custom, iPhone Retina */ |

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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName:'Matt\'s Application', | |
appVersion: '1.3.4' | |
}); |
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 = "This is a cat" | |
=> "This is a cat" | |
> a.__id__ | |
=> 7971260 | |
> b = "This is a dog" | |
=> "This is a dog" | |
> b.__id__ | |
=> 7965700 | |
> a = b.replace("This is a bird") |
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
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { | |
// Override point for customization after application launch. | |
updateStylesFromServer() | |
return true | |
} | |
// MARK: - Remote Style Updating | |
func updateStylesFromServer() { | |
Alamofire.request(.GET, "https://consultant-aide.firebaseio.com/brands/lularoe.json") | |
.responseJSON { response in |
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
// | |
// StylePickerViewController.swift | |
// ConsultantAide | |
// | |
// Created by Matt Orahood on 5/28/16. | |
// Copyright © 2016 Matt Orahood. All rights reserved. | |
// | |
import UIKit | |
import CoreData |
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
E/AndroidRuntime: FATAL EXCEPTION: main | |
Process: com.mattorahood.coolcalc, PID: 4008 | |
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.mattorahood.coolcalc/com.mattorahood.coolcalc.MainActivity}: android.view.InflateException: Binary XML file line #167: Binary XML file line #167: Error inflating class <unknown> | |
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2665) | |
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2726) | |
at android.app.ActivityThread.-wrap12(ActivityThread.java) | |
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1477) | |
at android.os.Handler.dispatchMessage(Handler.java:102) | |
at android.os.Looper.loop(Looper.java:154) | |
at android.app.ActivityThread.main(ActivityThread.java:6119) |
OlderNewer