Commit b5f4394d by Ryan Bigg

move paranoia into a `bundle gem` format because we don't like using submodules

parents
pkg/*
*.gem
.bundle
source :gemcutter
# Specify your gem's dependencies in paranoia.gemspec
gemspec
require 'bundler'
Bundler::GemHelper.install_tasks
module Paranoia
def deleted?
!!self["deleted_at"]
end
def destroy
self["deleted_at"] = Time.now
self.save
_run_destroy_callbacks
end
alias_method :delete, :destroy
end
class ActiveRecord::Base
def self.acts_as_paranoid
self.send(:include, Paranoia)
default_scope :conditions => { :deleted_at => nil }
end
end
\ No newline at end of file
module Paranoia
VERSION = "0.0.1"
end
# -*- encoding: utf-8 -*-
require File.expand_path("../lib/paranoia/version", __FILE__)
Gem::Specification.new do |s|
s.name = "paranoia"
s.version = Paranoia::VERSION
s.platform = Gem::Platform::RUBY
s.authors = []
s.email = []
s.homepage = "http://rubygems.org/gems/paranoia"
s.summary = "TODO: Write a gem summary"
s.description = "TODO: Write a gem description"
s.required_rubygems_version = ">= 1.3.6"
s.rubyforge_project = "paranoia"
s.add_dependency "activerecord", "~> 3.0.0"
s.add_development_dependency "bundler", ">= 1.0.0"
s.files = `git ls-files`.split("\n")
s.executables = `git ls-files`.split("\n").map{|f| f =~ /^bin\/(.*)/ ? $1 : nil}.compact
s.require_path = 'lib'
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment