Skip to content

Instantly share code, notes, and snippets.

test "should only generate url tokens on creation" do
invite = invites(:page)
old_token = invite.url_token
invite.last_visited_at = 1.day.ago
invite.save
invite.reload
new_token = invite.url_token
module URIExtension
def self.included(klass)
klass.extend ClassMethods
end
module ClassMethods
def foo
"baz"
end
/opt/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/vendor/html-scanner
/opt/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/vendor/i18n-0.0.1
/opt/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12
/opt/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/vendor/memcache-client-1.5.1
/Users/avk/Documents/My Code/Ruby on Rails/feedback/coreapp/app/controllers/
/Users/avk/Documents/My Code/Ruby on Rails/feedback/coreapp/app
/Users/avk/Documents/My Code/Ruby on Rails/feedback/coreapp/app/models
/Users/avk/Documents/My Code/Ruby on Rails/feedback/coreapp/app/controllers
/Users/avk/Documents/My Code/Ruby on Rails/feedback/coreapp/app/helpers
/Users/avk/Documents/My Code/Ruby on Rails/feedback/coreapp/config
avk ~/public_html/gracechow.com/current: rake RAILS_ENV=production db:migrate --trace
(in /home/avk/public_html/gracechow.com/releases/20090707223211)
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
Mysql::Error: Table 'gracechow_production.galleries' doesn't exist: SELECT * FROM `galleries` ORDER BY sequence ASC LIMIT 1
/home/avk/public_html/gracechow.com/releases/20090707223211/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:188:in `log'
/home/avk/public_html/gracechow.com/releases/20090707223211/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:309:in `execute'
/home/avk/public_html/gracechow.com/releases/20090707223211/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:563:in `select'
# Place any notes or comments you have here
# It will make any customisation easier to understand in the weeks to come
# domain: gracechow.com
# public: /home/avk/public_html/gracechow.com/
<VirtualHost *:80>
# Admin email, Server Name (domain name) and any aliases
ServerAdmin [email protected]
.css({
'width':'300px',
'position':'absolute',
'top':'15px',
'right':'15px',
'border':'1px solid black',
'padding':'5px'
})
[user]
name = Arthur Klepchukov
email = [email protected]
[alias]
co = checkout
st = status
ci = commit
a = add
b = branch
d = diff
test 'should delete all pages when deleted' do
base_url = "http://google.com/"
site = nil
assert_difference "Site.count", 1 do
site = create_site(:url => base_url)
end
page_urls = %w(maps movies alerts)
assert_difference "Page.count", page_urls.size do
page_urls.each do |page_url|
describe User, "is created and activated properly" do
before(:each) do
@user = User.new
end
describe "new user from development environment" do
before(:each) do
@user.context = :dev
end
class Site < ActiveRecord::Base
has_many :pages
belongs_to :account
validates_presence_of :url
validates_format_of :url, :with => URI.regexp(['http', 'https'])
validates_presence_of :account_id
validates_associated :account