Skip to content
This repository was archived by the owner on Jan 8, 2018. It is now read-only.

Commit ff0848d

Browse files
Merge pull request #11 from ninech/ensure-consistency-for-customers
also use acts_as_paranoid for the customers
2 parents b06e0cd + 8564c28 commit ff0848d

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

app/models/customer.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
#
1111

1212
class Customer < ActiveRecord::Base
13+
acts_as_paranoid
14+
1315
has_many :projects
1416
has_many :activities
1517

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
class AddDeletedAtToCustomers < ActiveRecord::Migration
2+
def change
3+
add_column :customers, :deleted_at, :datetime
4+
end
5+
end

db/schema.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#
1212
# It's strongly recommended to check this file into your version control system.
1313

14-
ActiveRecord::Schema.define(:version => 20140211121101) do
14+
ActiveRecord::Schema.define(:version => 20140506144544) do
1515

1616
create_table "absence_schedules", :force => true do |t|
1717
t.boolean "active", :default => false
@@ -92,6 +92,7 @@
9292
t.datetime "created_at", :null => false
9393
t.datetime "updated_at", :null => false
9494
t.string "abbreviation"
95+
t.datetime "deleted_at"
9596
end
9697

9798
add_index "customers", ["number"], :name => "index_customers_on_id", :unique => true

0 commit comments

Comments
 (0)