Skip to content

Commit

Permalink
Remove references to AR::Observer from docs
Browse files Browse the repository at this point in the history
ActiveRecord::Observer was extracted into a separate gem so it
should not be referenced anymore (see rails@ccecab3)
  • Loading branch information
claudiob committed Nov 30, 2012
1 parent 76c432f commit 20c03e7
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 19 deletions.
11 changes: 0 additions & 11 deletions activerecord/README.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -80,17 +80,6 @@ A short rundown of some of the major features:
{Learn more}[link:classes/ActiveRecord/Callbacks.html]


* Observers that react to changes in a model.

class CommentObserver < ActiveRecord::Observer
def after_create(comment) # is called just after Comment#save
CommentMailer.new_comment_email('[email protected]', comment).deliver
end
end

{Learn more}[link:classes/ActiveRecord/Observer.html]


* Inheritance hierarchies.

class Company < ActiveRecord::Base; end
Expand Down
8 changes: 0 additions & 8 deletions guides/source/active_support_core_extensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -2067,14 +2067,6 @@ The sum of an empty receiver can be customized in this form as well:
[].sum(1) {|n| n**3} # => 1
```

The method `ActiveRecord::Observer#observed_subclasses` for example is implemented this way:

```ruby
def observed_subclasses
observed_classes.sum([]) { |klass| klass.send(:subclasses) }
end
```

NOTE: Defined in `active_support/core_ext/enumerable.rb`.

### `index_by`
Expand Down

0 comments on commit 20c03e7

Please sign in to comment.