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 UpdatePosts < ActiveRecord::Migration | |
class Post < ActiveRecord::Base | |
has_many :comments | |
end | |
class Comment < ActiveRecord::Base | |
belongs_to :post | |
end | |
def change |
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
function KeyHandler(){ | |
//handy underscoreJS function | |
_.bindAll(this, 'handleUpKey', 'handleKey'); | |
this.handleUp = function(e){ | |
//we can use jQuery to trigger events on plain ol' JavaScript objects | |
$(this).trigger('up'); | |
} | |
this.handleKey = function(e){ |
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
# Path to your oh-my-zsh installation. | |
export ZSH=$HOME/.oh-my-zsh | |
# Set name of the theme to load. | |
# Look in ~/.oh-my-zsh/themes/ | |
# Optionally, if you set this to "random", it'll load a random theme each | |
# time that oh-my-zsh is loaded. | |
ZSH_THEME="robbyrussell" | |
# Uncomment the following line to use case-sensitive completion. |
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
irb(main):001:0> require 'rubygems' | |
=> false | |
irb(main):002:0> require 'hmac/sha1' | |
LoadError: no such file to load -- hmac/sha1 | |
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' | |
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' |
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
<html> | |
<head> | |
<title>Payment Sent</title> | |
</head> | |
<body> | |
<%= automated_line %> | |
<p>Hi <%= @contact_information.display_name %>,</p> | |
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
<html> | |
<head> | |
<title>Payment Sent</title> | |
</head> | |
<body> | |
<p>THIS IS AN AUTOMATED EMAIL</p> | |
<p>Hi ,</p> |
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
require File.dirname(__FILE__) + '/../spec_helper' | |
class Message | |
has_many :copies | |
has_many :recipients, :through => :copies | |
end | |
class MessageCopy | |
belongs_to :recipient | |
belongs_to :message |
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
rescue_from ActionController::UnknownAction, :with => :render_not_found_error | |
rescue_from ActionController::UnknownController, :with => :render_not_found_error |
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
<%- tab_menu "User Menu" do |t| %> | |
<%= t.tab "Favorite Users", user_url(@user) %> | |
<%- end -%> |
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
@message = Factory.build(:message) | |
@message.recipients << Factory(:user, :login => "recipients") | |
@message.save! #fail | |
user = Factory(:user) | |
@message = Factory(:message, :recipients => [User.find(:first)]) #great success |
OlderNewer