Permalink
Browse files

Merge andremedeiros/acts_as_paranoid@f77770e manually

  • Loading branch information...
1 parent b583c3c commit 17617a4291cae200a981b69d5304ee122847c030 @zzak zzak committed May 12, 2014
Showing with 4 additions and 5 deletions.
  1. +4 −5 README.md
View
@@ -183,14 +183,13 @@ Associations are also supported. From the simplest behaviors you'd expect to mor
```ruby
class Parent < ActiveRecord::Base
- has_many :children, :class_name => "ParanoiacChild"
+ has_many :children, :class_name => "ParanoiacChild"
end
class ParanoiacChild < ActiveRecord::Base
- belongs_to :parent
- belongs_to :parent_including_deleted, :class_name => "Parent", :with_deleted => true
- # You cannot name association *_with_deleted
-
+ acts_as_paranoid
+ belongs_to :parent
+
# You may need to provide a foreign_key like this
belongs_to :parent_including_deleted, :class_name => "Parent", foreign_key => 'parent_id', :with_deleted => true
end

0 comments on commit 17617a4

Please sign in to comment.