Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am mesozoic on github.
  • I am mesozoic (https://keybase.io/mesozoic) on keybase.
  • I have a public key whose fingerprint is F535 9C35 8D2E DE2C F54F F7A8 CC5B 1C85 9741 653B

To claim this, I am signing this object:

require 'spec_helper'
feature 'Manage todos' do
scenario 'create a new todo' do
sign_in_as "user@example.com"
todo_titled("Buy eggs").create
expect(todo_titled("Buy eggs")).to be_visible
end
scenario 'view only todos the user has created' do
@mesozoic
mesozoic / unscoped_associations.rb
Created October 29, 2012 11:21 — forked from lwe/unscoped.rb
Module which provides the ability to unscope associations
# Provides the ability to unscope associations, this solves problems described in
# http://stackoverflow.com/questions/1540645/how-to-disable-default-scope-for-a-belongs-to/11012633#11012633
#
# Examples
#
# class Document < ActiveRecord::Base
# default_scope where(deleted: false)
# end
#
# class Comment < ActiveRecord::Base