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
# 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
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
App.Router.map -> | |
@resource "documents", -> | |
@resource "document", | |
path: "/:document_slug/:document_id" |
NewerOlder