Skip to content
This repository has been archived by the owner on Jun 30, 2021. It is now read-only.

Add code block formatting to Associations section #140

Open
wants to merge 1 commit into
base: rails3.0
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ Once you retrieve data using `with_deleted` scope you can check deletion status
### Associations
Associations are also supported. From the simplest behaviors you'd expect to more nifty things like the ones mentioned previously or the usage of the `:with_deleted` option with `belongs_to`

```
class ParanoiacParent < ActiveRecord::Base
has_many :children, :class_name => "ParanoiacChild"
end
Expand All @@ -119,7 +120,8 @@ child = parent.children.create
parent.destroy

child.parent #=> nil
child.parent_with_deleted #=> ParanoiacParent (it works!)
child.parent_with_deleted #=> ParanoiacParent #it works!
```

## Caveats

Expand Down