Skip to content

Commit

Permalink
it's Active Record not ActiveRecord
Browse files Browse the repository at this point in the history
/cc @fxn
  • Loading branch information
senny committed Apr 30, 2013
1 parent 887225e commit d2fe723
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 8 deletions.
2 changes: 1 addition & 1 deletion guides/source/2_2_release_notes.md
Expand Up @@ -200,7 +200,7 @@ Active Record association proxies now respect the scope of methods on the proxie
* More information:
* [Rails 2.2 Change: Private Methods on Association Proxies are Private](http://afreshcup.com/2008/10/24/rails-22-change-private-methods-on-association-proxies-are-private/)

### Other ActiveRecord Changes
### Other Active Record Changes

* `rake db:migrate:redo` now accepts an optional VERSION to target that specific migration to redo
* Set `config.active_record.timestamped_migrations = false` to have migrations with numeric prefix instead of UTC timestamp.
Expand Down
2 changes: 1 addition & 1 deletion guides/source/2_3_release_notes.md
Expand Up @@ -134,7 +134,7 @@ Rails 2.3 will introduce the notion of _default scopes_ similar to named scopes,

### Batch Processing

You can now process large numbers of records from an ActiveRecord model with less pressure on memory by using `find_in_batches`:
You can now process large numbers of records from an Active Record model with less pressure on memory by using `find_in_batches`:

```ruby
Customer.find_in_batches(:conditions => {:active => true}) do |customer_group|
Expand Down
2 changes: 1 addition & 1 deletion guides/source/3_0_release_notes.md
Expand Up @@ -475,7 +475,7 @@ As well as the following deprecations:
* `named_scope` in an Active Record class is deprecated and has been renamed to just `scope`.
* In `scope` methods, you should move to using the relation methods, instead of a `:conditions => {}` finder method, for example `scope :since, lambda {|time| where("created_at > ?", time) }`.
* `save(false)` is deprecated, in favor of `save(:validate => false)`.
* I18n error messages for ActiveRecord should be changed from :en.activerecord.errors.template to `:en.errors.template`.
* I18n error messages for Active Record should be changed from :en.activerecord.errors.template to `:en.errors.template`.
* `model.errors.on` is deprecated in favor of `model.errors[]`
* validates_presence_of => validates... :presence => true
* `ActiveRecord::Base.colorize_logging` and `config.active_record.colorize_logging` are deprecated in favor of `Rails::LogSubscriber.colorize_logging` or `config.colorize_logging`
Expand Down
2 changes: 1 addition & 1 deletion guides/source/3_2_release_notes.md
Expand Up @@ -189,7 +189,7 @@ Action Pack

* form\_for is changed to use "#{action}\_#{as}" as the css class and id if `:as` option is provided. Earlier versions used "#{as}\_#{action}".

* `ActionController::ParamsWrapper` on ActiveRecord models now only wrap `attr_accessible` attributes if they were set. If not, only the attributes returned by the class method `attribute_names` will be wrapped. This fixes the wrapping of nested attributes by adding them to `attr_accessible`.
* `ActionController::ParamsWrapper` on Active Record models now only wrap `attr_accessible` attributes if they were set. If not, only the attributes returned by the class method `attribute_names` will be wrapped. This fixes the wrapping of nested attributes by adding them to `attr_accessible`.

* Log "Filter chain halted as CALLBACKNAME rendered or redirected" every time a before callback halts.

Expand Down
5 changes: 4 additions & 1 deletion guides/source/active_record_querying.md
Expand Up @@ -1301,7 +1301,10 @@ Client.unscoped {
Dynamic Finders
---------------

NOTE: Dynamic finders have been deprecated in Rails 4.0 and will be removed in Rails 4.1. The best practice is to use ActiveRecord scopes instead. You can find the deprecation gem at https://github.com/rails/activerecord-deprecated_finders
NOTE: Dynamic finders have been deprecated in Rails 4.0 and will be
removed in Rails 4.1. The best practice is to use Active Record scopes
instead. You can find the deprecation gem at
https://github.com/rails/activerecord-deprecated_finders

For every field (also known as an attribute) you define in your table, Active Record provides a finder method. If you have a field called `first_name` on your `Client` model for example, you get `find_by_first_name` for free from Active Record. If you have a `locked` field on the `Client` model, you also get `find_by_locked` and methods.

Expand Down
4 changes: 3 additions & 1 deletion guides/source/active_support_core_extensions.md
Expand Up @@ -2216,7 +2216,9 @@ NOTE: Defined in `active_support/core_ext/array/conversions.rb`.

The method `to_formatted_s` acts like `to_s` by default.

If the array contains items that respond to `id`, however, the symbol `:db` may be passed as argument. That's typically used with collections of ActiveRecord objects. Returned strings are:
If the array contains items that respond to `id`, however, the symbol
`:db` may be passed as argument. That's typically used with
collections of Active Record objects. Returned strings are:

```ruby
[].to_formatted_s(:db) # => "null"
Expand Down
2 changes: 1 addition & 1 deletion guides/source/command_line.md
Expand Up @@ -201,7 +201,7 @@ Usage:

...

ActiveRecord options:
Active Record options:
[--migration] # Indicates when to generate migration
# Default: true

Expand Down
2 changes: 1 addition & 1 deletion guides/source/configuring.md
Expand Up @@ -729,7 +729,7 @@ development:
timeout: 5000
```

Since the connection pooling is handled inside of ActiveRecord by default, all application servers (Thin, mongrel, Unicorn etc.) should behave the same. Initially, the database connection pool is empty and it will create additional connections as the demand for them increases, until it reaches the connection pool limit.
Since the connection pooling is handled inside of Active Record by default, all application servers (Thin, mongrel, Unicorn etc.) should behave the same. Initially, the database connection pool is empty and it will create additional connections as the demand for them increases, until it reaches the connection pool limit.

Any one request will check out a connection the first time it requires access to the database, after which it will check the connection back in, at the end of the request, meaning that the additional connection slot will be available again for the next request in the queue.

Expand Down

0 comments on commit d2fe723

Please sign in to comment.