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 User < ActiveRecord::Base | |
UNKNOWN_EMAIL = "That email address isn't registered." | |
WRONG_PASSWORD = 'Password is incorrect.' | |
LOGIN_SUCCESSFUL = "You're in!" | |
attr_accessor :password | |
attr_accessible :email, :password, :country_id | |
belongs_to :country | |
has_many :budgets, :dependent => :destroy |
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
source 'https://rubygems.org' | |
gem 'rails', '3.2.2' | |
gem 'haml' | |
gem 'haml-rails' | |
gem 'coffee-filter' | |
# Gems used only for assets and not required | |
# in production environments by default. | |
group :assets do |
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
Process: Sublime Text 2 [7319] | |
Path: /Applications/Sublime Text 2.app/Contents/MacOS/Sublime Text 2 | |
Identifier: com.sublimetext.2 | |
Version: Beta, Build 2180 (2180) | |
Code Type: X86-64 (Native) | |
Parent Process: launchd [258] | |
Date/Time: 2012-02-24 17:10:14.617 -0600 | |
OS Version: Mac OS X 10.7.3 (11D50) | |
Report Version: 9 |
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
# This script allows you to do multiple find/replace operations in one pass. The find/replace | |
# pairs are defined in a file (defaults to ~/.st2_multiple_find_replace) using the format | |
# | |
# find <separator> replace | |
# By default, the separator is the hash-pointer (=>), but it can be changed if | |
# necessary (see below). To use multiple find and replace, save this code to a file in | |
# your Packages/User folder using whatever name you like. I use multiple_find_replace.py. | |
# Edit your user key bindings and pick whatever key combinations you want to trigger | |
# these operations. On Mac OS X, I chose COMMAND+OPTION+M E to edit and COMMAND+OPTION+M R |
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 sublime, sublime_plugin | |
import os, string, re | |
class DetectFileTypeCommand(sublime_plugin.EventListener): | |
""" Attempts to choose the correct syntax when more than one could apply. """ | |
def __init__(self): | |
super(DetectFileTypeCommand, self).__init__() | |
self.path = None |
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
# assumes 1.9.3-p0 is already installed in RVM (1.9.2) and you are in an empty gemset | |
curl -OL http://rubyforge.org/frs/download.php/75414/linecache19-0.5.13.gem | |
curl -OL http://rubyforge.org/frs/download.php/75415/ruby-debug-base19-0.11.26.gem | |
gem install rake | |
gem install archive-tar-minitar | |
gem install ruby_core_source | |
gem install columnize | |
gem install linecache19-0.5.13.gem -- --with-ruby-include="$rvm_path/src/`rvm tools strings`" | |
gem install ruby-debug-base19-0.11.26.gem -- --with-ruby-include="$rvm_path/src/`rvm tools strings`" |
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
// Note that the track_changes function indicated in the callback is part of | |
// a custom change tracking solution that is called in the onchange event | |
// of extended form elements. | |
var date_picker_field_id = 'some-dom-id'; | |
var date_picker_field = $(date_picker_field_id); | |
form_elements = {}; | |
form_elements[date_picker_field_id] = '%Y-%m-%d'; |
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
actionmailer (2.3.11) | |
actionpack (2.3.11) | |
activerecord (2.3.11) | |
activeresource (2.3.11) | |
activesupport (2.3.11) | |
akephalos (0.2.5) | |
archive-tar-minitar (0.5.2) | |
builder (3.0.0) | |
capybara (0.4.1.2) | |
celerity (0.8.9) |
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
Feature: API Messages Create | |
Scenario: API key is not provided | |
Given a valid message | |
When I post the message without the api key | |
Then the response code should be 401 | |
================================================================= |
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 BaseController < ApplicationController | |
# put everything in here that is common to all controllers | |
end | |
class User::BaseController < BaseController | |
before_filter :require_logged_in | |
private | |
def require_logged_in |
NewerOlder