aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--actionmailer/CHANGELOG.md3
-rw-r--r--actionpack/CHANGELOG.md3
-rw-r--r--actionpack/lib/action_dispatch/middleware/cookies.rb2
-rw-r--r--actionpack/lib/action_dispatch/middleware/remote_ip.rb2
-rw-r--r--actionpack/test/controller/routing_test.rb16
-rw-r--r--activemodel/CHANGELOG.md3
-rw-r--r--activerecord/CHANGELOG.md17
-rw-r--r--activerecord/RUNNING_UNIT_TESTS.rdoc2
-rw-r--r--activerecord/lib/active_record/associations/belongs_to_association.rb2
-rw-r--r--activerecord/lib/active_record/connection_adapters/abstract/schema_dumper.rb2
-rw-r--r--activesupport/CHANGELOG.md3
-rw-r--r--activesupport/README.rdoc4
-rw-r--r--guides/CHANGELOG.md3
-rw-r--r--guides/source/action_mailer_basics.md4
-rw-r--r--guides/source/active_record_querying.md4
-rw-r--r--guides/source/active_support_core_extensions.md20
-rw-r--r--guides/source/caching_with_rails.md5
-rw-r--r--guides/source/layouts_and_rendering.md3
-rw-r--r--guides/source/routing.md2
-rw-r--r--guides/source/upgrading_ruby_on_rails.md8
-rw-r--r--railties/CHANGELOG.md3
21 files changed, 83 insertions, 28 deletions
diff --git a/actionmailer/CHANGELOG.md b/actionmailer/CHANGELOG.md
index 3907e93097..8f74ac0928 100644
--- a/actionmailer/CHANGELOG.md
+++ b/actionmailer/CHANGELOG.md
@@ -1,3 +1,6 @@
+## Rails 4.0.0 (unreleased) ##
+
+
## Rails 4.0.0.beta1 (February 25, 2013) ##
* Allow passing interpolations to `#default_i18n_subject`, e.g.:
diff --git a/actionpack/CHANGELOG.md b/actionpack/CHANGELOG.md
index 5197d944b1..8ae23598b4 100644
--- a/actionpack/CHANGELOG.md
+++ b/actionpack/CHANGELOG.md
@@ -1,3 +1,6 @@
+## Rails 4.0.0 (unreleased) ##
+
+
## Rails 4.0.0.beta1 (February 25, 2013) ##
* Fix `respond_to` not using formats that have no block if all is present. *Michael Grosser*
diff --git a/actionpack/lib/action_dispatch/middleware/cookies.rb b/actionpack/lib/action_dispatch/middleware/cookies.rb
index ee29e5c59c..36a0db6e61 100644
--- a/actionpack/lib/action_dispatch/middleware/cookies.rb
+++ b/actionpack/lib/action_dispatch/middleware/cookies.rb
@@ -205,7 +205,7 @@ module ActionDispatch
end
# Removes the cookie on the client machine by setting the value to an empty string
- # and setting its expiration date into the past. Like <tt>[]=</tt>, you can pass in
+ # and the expiration date in the past. Like <tt>[]=</tt>, you can pass in
# an options hash to delete cookies with extra data such as a <tt>:path</tt>.
def delete(key, options = {})
return unless @cookies.has_key? key.to_s
diff --git a/actionpack/lib/action_dispatch/middleware/remote_ip.rb b/actionpack/lib/action_dispatch/middleware/remote_ip.rb
index 6de9be63c5..93a2b52996 100644
--- a/actionpack/lib/action_dispatch/middleware/remote_ip.rb
+++ b/actionpack/lib/action_dispatch/middleware/remote_ip.rb
@@ -9,7 +9,7 @@ module ActionDispatch
# at GetIp#calculate_ip.
#
# Some Rack servers concatenate repeated headers, like {HTTP RFC 2616}[http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2]
- # requires. Some Rack servers simply drop preceeding headers, and only report
+ # requires. Some Rack servers simply drop preceding headers, and only report
# the value that was {given in the last header}[http://andre.arko.net/2011/12/26/repeated-headers-and-ruby-web-servers].
# If you are behind multiple proxy servers (like Nginx to HAProxy to Unicorn)
# then you should test your Rack server to make sure your data is good.
diff --git a/actionpack/test/controller/routing_test.rb b/actionpack/test/controller/routing_test.rb
index 5e821046db..93e94f0f48 100644
--- a/actionpack/test/controller/routing_test.rb
+++ b/actionpack/test/controller/routing_test.rb
@@ -456,6 +456,22 @@ class LegacyRouteSetTests < ActiveSupport::TestCase
assert_equal("/", routes.send(:root_path))
end
+ def test_named_route_root_with_hash
+ rs.draw do
+ root "hello#index", as: :index
+ end
+
+ routes = setup_for_named_route
+ assert_equal("http://test.host/", routes.send(:index_url))
+ assert_equal("/", routes.send(:index_path))
+ end
+
+ def test_root_without_path_raises_argument_error
+ assert_raises ArgumentError do
+ rs.draw { root nil }
+ end
+ end
+
def test_named_route_root_with_trailing_slash
rs.draw do
root "hello#index"
diff --git a/activemodel/CHANGELOG.md b/activemodel/CHANGELOG.md
index 227374b331..1fe6dbd4d9 100644
--- a/activemodel/CHANGELOG.md
+++ b/activemodel/CHANGELOG.md
@@ -1,3 +1,6 @@
+## Rails 4.0.0 (unreleased) ##
+
+
## Rails 4.0.0.beta1 (February 25, 2013) ##
* Add `ActiveModel::Validations::AbsenceValidator`, a validator to check the
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md
index 3fbf043c7c..982fbdc236 100644
--- a/activerecord/CHANGELOG.md
+++ b/activerecord/CHANGELOG.md
@@ -1,8 +1,4 @@
-## Rails 4.0.0.beta1 (February 25, 2013) ##
-
-* Fix overriding of attributes by default_scope on `ActiveRecord::Base#dup`.
-
- *Hiroshige UMINO*
+## Rails 4.0.0 (unreleased) ##
* Fix when performing an ordered join query. The bug only
affected queries where the order was given with a symbol.
@@ -13,6 +9,17 @@
# This will expand the order :name to "authors".name.
Author.joins(:books).where('books.published = 1').order(:name)
+
+## Rails 4.0.0.beta1 (February 25, 2013) ##
+
+* Fix overriding of attributes by default_scope on `ActiveRecord::Base#dup`.
+
+ *Hiroshige UMINO*
+
+* Update queries now use prepared statements.
+
+ *Olli Rissanen*
+
* Fixing issue #8345. Now throwing an error when one attempts to touch a
new object that has not yet been persisted. For instance:
diff --git a/activerecord/RUNNING_UNIT_TESTS.rdoc b/activerecord/RUNNING_UNIT_TESTS.rdoc
index bdd8834dcb..2f3d516c43 100644
--- a/activerecord/RUNNING_UNIT_TESTS.rdoc
+++ b/activerecord/RUNNING_UNIT_TESTS.rdoc
@@ -2,7 +2,7 @@
If you don't have the environment set make sure to read
- http://edgeguides.rubyonrails.org/contributing_to_ruby_on_rails.html#testing-active-record.
+ http://edgeguides.rubyonrails.org/contributing_to_ruby_on_rails.html#testing-active-record
== Running the Tests
diff --git a/activerecord/lib/active_record/associations/belongs_to_association.rb b/activerecord/lib/active_record/associations/belongs_to_association.rb
index 532af3e83e..54b1a69774 100644
--- a/activerecord/lib/active_record/associations/belongs_to_association.rb
+++ b/activerecord/lib/active_record/associations/belongs_to_association.rb
@@ -1,5 +1,5 @@
module ActiveRecord
- # = Active Record Belongs To Associations
+ # = Active Record Belongs To Association
module Associations
class BelongsToAssociation < SingularAssociation #:nodoc:
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/schema_dumper.rb b/activerecord/lib/active_record/connection_adapters/abstract/schema_dumper.rb
index fd5eaab9c9..cc289d4a14 100644
--- a/activerecord/lib/active_record/connection_adapters/abstract/schema_dumper.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_dumper.rb
@@ -4,7 +4,7 @@ module ActiveRecord
# definitions to the Adapter instead of having it in the schema
# dumper itself. This code represents the normal case.
# We can then redefine how certain data types may be handled in the schema dumper on the
- # Adapter level by over-writing this code inside the database spececific adapters
+ # Adapter level by over-writing this code inside the database specific adapters
module ColumnDumper
def column_spec(column, types)
spec = prepare_column_options(column, types)
diff --git a/activesupport/CHANGELOG.md b/activesupport/CHANGELOG.md
index 97b3344db0..e76af6adc4 100644
--- a/activesupport/CHANGELOG.md
+++ b/activesupport/CHANGELOG.md
@@ -1,3 +1,6 @@
+## Rails 4.0.0 (unreleased) ##
+
+
## Rails 4.0.0.beta1 (February 25, 2013) ##
* Prevent `DateTime#change` from truncating the second fraction, when seconds
diff --git a/activesupport/README.rdoc b/activesupport/README.rdoc
index ed688ecc59..f3582767c0 100644
--- a/activesupport/README.rdoc
+++ b/activesupport/README.rdoc
@@ -12,7 +12,7 @@ The latest version of Active Support can be installed with RubyGems:
% [sudo] gem install activesupport
-Source code can be downloaded as part of the Rails project on GitHub
+Source code can be downloaded as part of the Rails project on GitHub:
* https://github.com/rails/rails/tree/master/activesupport
@@ -26,7 +26,7 @@ Active Support is released under the MIT license:
== Support
-API documentation is at
+API documentation is at:
* http://api.rubyonrails.org
diff --git a/guides/CHANGELOG.md b/guides/CHANGELOG.md
index a9595d1f15..ee6e64b731 100644
--- a/guides/CHANGELOG.md
+++ b/guides/CHANGELOG.md
@@ -1,3 +1,6 @@
+## Rails 4.0.0 (unreleased) ##
+
+
## Rails 4.0.0.beta1 (unreleased) ##
* Split Validations and Callbacks guide into two. *Steve Klabnik*
diff --git a/guides/source/action_mailer_basics.md b/guides/source/action_mailer_basics.md
index 513ae1272f..a5058aa749 100644
--- a/guides/source/action_mailer_basics.md
+++ b/guides/source/action_mailer_basics.md
@@ -116,7 +116,7 @@ Setting this up is painfully simple.
First off, we need to create a simple `User` scaffold:
```bash
-$ rails generate scaffold user name:string email:string login:string
+$ rails generate scaffold user name email login
$ rake db:migrate
```
@@ -447,7 +447,7 @@ end
Action Mailer Callbacks
---------------------------
-Action Mailer allows for you to specify a `before_action`, `after_action` and 'around_action'.
+Action Mailer allows for you to specify a `before_action`, `after_action` and `around_action`.
* Filters can be specified with a block or a symbol to a method in the mailer class similar to controllers.
diff --git a/guides/source/active_record_querying.md b/guides/source/active_record_querying.md
index bc3b1669d2..5d82541da9 100644
--- a/guides/source/active_record_querying.md
+++ b/guides/source/active_record_querying.md
@@ -299,7 +299,7 @@ Client.first(2)
The SQL equivalent of the above is:
```sql
-SELECT * FROM clients LIMIT 2
+SELECT * FROM clients ORDER BY id ASC LIMIT 2
```
#### last
@@ -315,7 +315,7 @@ Client.last(2)
The SQL equivalent of the above is:
```sql
-SELECT * FROM clients ORDER By id DESC LIMIT 2
+SELECT * FROM clients ORDER BY id DESC LIMIT 2
```
### Retrieving Multiple Objects in Batches
diff --git a/guides/source/active_support_core_extensions.md b/guides/source/active_support_core_extensions.md
index f02b377832..517db0d222 100644
--- a/guides/source/active_support_core_extensions.md
+++ b/guides/source/active_support_core_extensions.md
@@ -3320,7 +3320,25 @@ date.end_of_hour # => Mon Jun 07 19:59:59 +0200 2010
`beginning_of_hour` is aliased to `at_beginning_of_hour`.
-INFO: `beginning_of_hour` and `end_of_hour` are implemented for `Time` and `DateTime` but **not** `Date` as it does not make sense to request the beginning or end of an hour on a `Date` instance.
+##### `beginning_of_minute`, `end_of_minute`
+
+The method `beginning_of_minute` returns a timestamp at the beginning of the minute (hh:mm:00):
+
+```ruby
+date = DateTime.new(2010, 6, 7, 19, 55, 25)
+date.beginning_of_minute # => Mon Jun 07 19:55:00 +0200 2010
+```
+
+The method `end_of_minute` returns a timestamp at the end of the minute (hh:mm:59):
+
+```ruby
+date = DateTime.new(2010, 6, 7, 19, 55, 25)
+date.end_of_minute # => Mon Jun 07 19:55:59 +0200 2010
+```
+
+`beginning_of_minute` is aliased to `at_beginning_of_minute`.
+
+INFO: `beginning_of_hour`, `end_of_hour`, `beginning_of_minute` and `end_of_minute` are implemented for `Time` and `DateTime` but **not** `Date` as it does not make sense to request the beginning or end of an hour or minute on a `Date` instance.
##### `ago`, `since`
diff --git a/guides/source/caching_with_rails.md b/guides/source/caching_with_rails.md
index a270ec7a7e..abab3dd983 100644
--- a/guides/source/caching_with_rails.md
+++ b/guides/source/caching_with_rails.md
@@ -343,8 +343,3 @@ class ProductsController < ApplicationController
end
end
```
-
-Further reading
----------------
-
-* [Scaling Rails Screencasts](http://railslab.newrelic.com/scaling-rails)
diff --git a/guides/source/layouts_and_rendering.md b/guides/source/layouts_and_rendering.md
index 339008ab9e..bfd1a7c61b 100644
--- a/guides/source/layouts_and_rendering.md
+++ b/guides/source/layouts_and_rendering.md
@@ -568,7 +568,8 @@ def show
@book = Book.find_by_id(params[:id])
if @book.nil?
@books = Book.all
- render "index", alert: "Your book was not found!"
+ flash[:alert] = "Your book was not found"
+ render "index"
end
end
```
diff --git a/guides/source/routing.md b/guides/source/routing.md
index 4614169653..8c8ac34862 100644
--- a/guides/source/routing.md
+++ b/guides/source/routing.md
@@ -155,7 +155,7 @@ creates six different routes in your application, all mapping to the `Geocoders`
| PATCH/PUT | /geocoder | update | update the one and only geocoder resource |
| DELETE | /geocoder | destroy | delete the geocoder resource |
-NOTE: Because you might want to use the same controller for a singular route (`/account`) and a plural route (`/accounts/45`), singular resources map to plural controllers.
+NOTE: Because you might want to use the same controller for a singular route (`/account`) and a plural route (`/accounts/45`), singular resources map to plural controllers. So that, for example, `resource :photo` and `resources :photos` creates both singular and plural routes that map to the same controller (`PhotosController`).
A singular resourceful route generates these helpers:
diff --git a/guides/source/upgrading_ruby_on_rails.md b/guides/source/upgrading_ruby_on_rails.md
index f5d7f1bfe2..52f5232efc 100644
--- a/guides/source/upgrading_ruby_on_rails.md
+++ b/guides/source/upgrading_ruby_on_rails.md
@@ -114,14 +114,14 @@ Upgrading from Rails 3.1 to Rails 3.2
If your application is currently on any version of Rails older than 3.1.x, you should upgrade to Rails 3.1 before attempting an update to Rails 3.2.
-The following changes are meant for upgrading your application to Rails 3.2.2, the latest 3.2.x version of Rails.
+The following changes are meant for upgrading your application to Rails 3.2.12, the latest 3.2.x version of Rails.
### Gemfile
Make the following changes to your `Gemfile`.
```ruby
-gem 'rails', '= 3.2.2'
+gem 'rails', '= 3.2.12'
group :assets do
gem 'sass-rails', '~> 3.2.3'
@@ -161,14 +161,14 @@ Upgrading from Rails 3.0 to Rails 3.1
If your application is currently on any version of Rails older than 3.0.x, you should upgrade to Rails 3.0 before attempting an update to Rails 3.1.
-The following changes are meant for upgrading your application to Rails 3.1.3, the latest 3.1.x version of Rails.
+The following changes are meant for upgrading your application to Rails 3.1.11, the latest 3.1.x version of Rails.
### Gemfile
Make the following changes to your `Gemfile`.
```ruby
-gem 'rails', '= 3.1.3'
+gem 'rails', '= 3.1.11'
gem 'mysql2'
# Needed for the new asset pipeline
diff --git a/railties/CHANGELOG.md b/railties/CHANGELOG.md
index 5efdbfecc6..f3c07470af 100644
--- a/railties/CHANGELOG.md
+++ b/railties/CHANGELOG.md
@@ -1,3 +1,6 @@
+## Rails 4.0.0 (unreleased) ##
+
+
## Rails 4.0.0.beta1 (February 25, 2013) ##
* Improve `rake stats` for JavaScript and CoffeeScript: ignore block comments