From 6de3f1fb4e3160d0ab8f986ebe9287ce1a19aab0 Mon Sep 17 00:00:00 2001
From: Ilya Zayats
Date: Sat, 26 Feb 2011 07:49:50 +0300
Subject: added information about TEST_DIR env variable
---
railties/guides/source/contributing_to_ruby_on_rails.textile | 8 ++++++++
1 file changed, 8 insertions(+)
(limited to 'railties')
diff --git a/railties/guides/source/contributing_to_ruby_on_rails.textile b/railties/guides/source/contributing_to_ruby_on_rails.textile
index 1977f8d0ce..e00b26f948 100644
--- a/railties/guides/source/contributing_to_ruby_on_rails.textile
+++ b/railties/guides/source/contributing_to_ruby_on_rails.textile
@@ -101,6 +101,14 @@ $ cd actionpack
$ rake test
+If you want to run tests from the specific directory use the +TEST_DIR+ environment variable. For example, this will run tests inside +railties/test/generators+ directory only:
+
+
+$ cd railties
+$ TEST_DIR=generators rake test
+
+
+
h4. Warnings
The test suite runs with warnings enabled. Ideally Ruby on Rails should issue no warning, but there may be a few, and also some from third-party libraries. Please ignore (or fix!) them if any, and submit patches that do not issue new warnings.
--
cgit v1.2.3
From e331ec0952bb199345d2f77a089abf9cd4f44240 Mon Sep 17 00:00:00 2001
From: Ben Orenstein
Date: Sat, 26 Feb 2011 13:28:40 -0500
Subject: Warn people that these methods are deprecated.
---
railties/guides/source/active_support_core_extensions.textile | 2 ++
1 file changed, 2 insertions(+)
(limited to 'railties')
diff --git a/railties/guides/source/active_support_core_extensions.textile b/railties/guides/source/active_support_core_extensions.textile
index 788c243d2a..4074eac7e7 100644
--- a/railties/guides/source/active_support_core_extensions.textile
+++ b/railties/guides/source/active_support_core_extensions.textile
@@ -1045,6 +1045,8 @@ NOTE: Defined in +active_support/core_ext/class/attribute_accessors.rb+.
h4. Class Inheritable Attributes
+WARNING: Class Inheritable Attributes are deprecated. It's recommended that you use +Class#class_attribute+ instead.
+
Class variables are shared down the inheritance tree. Class instance variables are not shared, but they are not inherited either. The macros +class_inheritable_reader+, +class_inheritable_writer+, and +class_inheritable_accessor+ provide accessors for class-level data which is inherited but not shared with children:
--
cgit v1.2.3
From 72ae724485cb092870dc9914a4f95aa6fbeda7fa Mon Sep 17 00:00:00 2001
From: Vijay Dev
Date: Sun, 27 Feb 2011 02:14:30 +0530
Subject: use resources in place of map.resources
---
railties/guides/source/generators.textile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'railties')
diff --git a/railties/guides/source/generators.textile b/railties/guides/source/generators.textile
index 41a96b487d..fc7b1216d5 100644
--- a/railties/guides/source/generators.textile
+++ b/railties/guides/source/generators.textile
@@ -345,7 +345,7 @@ $ rails generate scaffold Comment body:text
invoke shoulda
create test/unit/comment_test.rb
create test/fixtures/comments.yml
- route map.resources :comments
+ route resources :comments
invoke scaffold_controller
create app/controllers/comments_controller.rb
invoke erb
--
cgit v1.2.3
From 9b35eeec6271d341f6fbc64b3515516905d9883e Mon Sep 17 00:00:00 2001
From: Ben Orenstein
Date: Sat, 26 Feb 2011 19:07:35 -0500
Subject: Clean up wording.
---
railties/guides/source/active_support_core_extensions.textile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'railties')
diff --git a/railties/guides/source/active_support_core_extensions.textile b/railties/guides/source/active_support_core_extensions.textile
index 4074eac7e7..7becefee09 100644
--- a/railties/guides/source/active_support_core_extensions.textile
+++ b/railties/guides/source/active_support_core_extensions.textile
@@ -2011,7 +2011,7 @@ That syntactic sugar is used a lot in Rails to avoid positional arguments where
If a method expects a variable number of arguments and uses * in its declaration, however, such an options hash ends up being an item of the array of arguments, where it loses its role.
-In those cases, you may give an options hash a distinguished treatment with +extract_options!+. That method checks the type of the last item of an array. If it is a hash it pops it and returns it, otherwise returns an empty hash.
+In those cases, you may give an options hash a distinguished treatment with +extract_options!+. This method checks the type of the last item of an array. If it is a hash it pops it and returns it, otherwise it returns an empty hash.
Let's see for example the definition of the +caches_action+ controller macro:
--
cgit v1.2.3
From 6ff10c17aa6955c1e7c6b3ce17f01f80649abf2b Mon Sep 17 00:00:00 2001
From: Rodrigo Navarro
Date: Sun, 27 Feb 2011 10:03:50 -0800
Subject: Pointing out that dynamic_form plugin must be installed to be able to
use error_messages and error_messages_for view helpers.
---
.../source/active_record_validations_callbacks.textile | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
(limited to 'railties')
diff --git a/railties/guides/source/active_record_validations_callbacks.textile b/railties/guides/source/active_record_validations_callbacks.textile
index 5dc6ef3774..58a184a48e 100644
--- a/railties/guides/source/active_record_validations_callbacks.textile
+++ b/railties/guides/source/active_record_validations_callbacks.textile
@@ -738,7 +738,20 @@ person.errors.size # => 0
h3. Displaying Validation Errors in the View
-Rails provides built-in helpers to display the error messages of your models in your view templates.
+Rails maintains an official plugin that provides helpers to display the error messages of your models in your view templates. You can install it as a plugin or as a Gem.
+
+h4. Installing as a plugin
+
+$ rails plugin install git://github.com/rails/dynamic_form.git
+
+
+h4 Installing as a Gem
+Add this line on your Gemfile:
+
+gem "dynamic_form"
+
+
+Now you will have access to these two methods in your view templates:
h4. +error_messages+ and +error_messages_for+
--
cgit v1.2.3
From 819762c90f9f49e92dd555a89f0e865f9bab9838 Mon Sep 17 00:00:00 2001
From: Lars Smit
Date: Mon, 28 Feb 2011 12:17:26 +0100
Subject: Added some new advice on applying patches
---
.../guides/source/contributing_to_ruby_on_rails.textile | 14 ++++++++++++++
1 file changed, 14 insertions(+)
(limited to 'railties')
diff --git a/railties/guides/source/contributing_to_ruby_on_rails.textile b/railties/guides/source/contributing_to_ruby_on_rails.textile
index e00b26f948..9739da2666 100644
--- a/railties/guides/source/contributing_to_ruby_on_rails.textile
+++ b/railties/guides/source/contributing_to_ruby_on_rails.textile
@@ -351,6 +351,20 @@ $ git format-patch master --stdout > my_new_patch.diff
Sanity check the results of this operation: open the diff file in your text editor of choice and make sure that no unintended changes crept in.
+You can check your patches by applying your patch to an different dedicated branch:
+
+
+$ git checkout -b testing_branch
+$ git apply --check my_new_patch.diff
+
+
+You can make sure your patches don't add any whitespace by applying it yourself using the --whitespace=error-all option. Make sure you are on your dedicated test branche and:
+
+
+$ git apply --whitespace=error-all mynew_patch.diff
+
+
+
h4. Create a Lighthouse Ticket
Now create a ticket with your patch. Go to the "new ticket":http://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/new page at Lighthouse. Fill in a reasonable title and description, remember to attach your patch file, and tag the ticket with the ‘patch’ tag and whatever other subject area tags make sense.
--
cgit v1.2.3
From 4c9626664f7cf2549939466e9c0e1f5853948111 Mon Sep 17 00:00:00 2001
From: Dalibor Nasevic
Date: Tue, 1 Mar 2011 01:16:30 +0100
Subject: Removed link to un-existing Issues page on Github
---
railties/guides/source/layout.html.erb | 3 ---
1 file changed, 3 deletions(-)
(limited to 'railties')
diff --git a/railties/guides/source/layout.html.erb b/railties/guides/source/layout.html.erb
index e924f2f6c0..f2681c6461 100644
--- a/railties/guides/source/layout.html.erb
+++ b/railties/guides/source/layout.html.erb
@@ -127,9 +127,6 @@
<%= link_to 'Ruby on Rails Guides Guidelines', 'ruby_on_rails_guides_guidelines.html' %>
for style and conventions.
-
- Issues may also be reported in <%= link_to 'Github', 'https://github.com/lifo/docrails/issues' %>.
-
And last but not least, any kind of discussion regarding Ruby on Rails
documentation is very welcome in the <%= link_to 'rubyonrails-docs mailing list', 'http://groups.google.com/group/rubyonrails-docs' %>.
--
cgit v1.2.3
From b4b7171d604702975b5a53afa6bf02baeb17f1b2 Mon Sep 17 00:00:00 2001
From: JudeArasu
Date: Thu, 3 Mar 2011 23:20:28 +0530
Subject: Spelling mistake
---
railties/README.rdoc | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
(limited to 'railties')
diff --git a/railties/README.rdoc b/railties/README.rdoc
index 789d5255b7..0457227473 100644
--- a/railties/README.rdoc
+++ b/railties/README.rdoc
@@ -4,7 +4,7 @@ Railties is responsible to glue all frameworks together. Overall, it:
* handles all the bootstrapping process for a Rails application;
-* manager rails command line interface;
+* manages rails command line interface;
* provides Rails generators core;
@@ -23,3 +23,4 @@ Documentation can be found at
== License
Railties is released under the MIT license.
+
--
cgit v1.2.3
From f44e0e82717062b3043a9ce65a8274f338817c83 Mon Sep 17 00:00:00 2001
From: tashian
Date: Thu, 3 Mar 2011 15:04:39 -0800
Subject: Properly escaped a + in the dynamic segments TIP
---
railties/guides/source/routing.textile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'railties')
diff --git a/railties/guides/source/routing.textile b/railties/guides/source/routing.textile
index d214031b31..c447fd911a 100644
--- a/railties/guides/source/routing.textile
+++ b/railties/guides/source/routing.textile
@@ -391,7 +391,7 @@ NOTE: You can't use +namespace+ or +:module+ with a +:controller+ path segment.
match ':controller(/:action(/:id))', :controller => /admin\/[^\/]+/
-TIP: By default dynamic segments don't accept dots - this is because the dot is used as a separator for formatted routes. If you need to use a dot within a dynamic segment add a constraint which overrides this - for example +:id => /[^\/]+/+ allows anything except a slash.
+TIP: By default dynamic segments don't accept dots - this is because the dot is used as a separator for formatted routes. If you need to use a dot within a dynamic segment add a constraint which overrides this - for example +:id => /[^\/]/+ allows anything except a slash.
h4. Static Segments
--
cgit v1.2.3
From c8dae23a2addbbeb8fabf832676b12ef51060b56 Mon Sep 17 00:00:00 2001
From: "R.T. Lechow"
Date: Fri, 4 Mar 2011 00:19:58 -0500
Subject: Railties typos.
---
railties/lib/rails/engine.rb | 6 +++---
.../rails/generators/rails/plugin_new/templates/test/test_helper.rb | 2 +-
railties/lib/rails/generators/resource_helpers.rb | 2 +-
railties/lib/rails/railtie/configuration.rb | 2 +-
4 files changed, 6 insertions(+), 6 deletions(-)
(limited to 'railties')
diff --git a/railties/lib/rails/engine.rb b/railties/lib/rails/engine.rb
index 6e5e842370..4ce874d4b9 100644
--- a/railties/lib/rails/engine.rb
+++ b/railties/lib/rails/engine.rb
@@ -252,12 +252,12 @@ module Rails
# end
#
# The routes above will automatically point to MyEngine::ApplicationContoller. Furthermore, you don't
- # need to use longer url helpers like my_engine_articles_path. Instead, you shuold simply use
+ # need to use longer url helpers like my_engine_articles_path. Instead, you should simply use
# articles_path as you would do with your application.
#
# To make that behaviour consistent with other parts of the framework, an isolated engine also has influence on
# ActiveModel::Naming. When you use a namespaced model, like MyEngine::Article, it will normally
- # use the prefix "my_engine". In an isolated engine, the prefix will be ommited in url helpers and
+ # use the prefix "my_engine". In an isolated engine, the prefix will be omitted in url helpers and
# form fields for convenience.
#
# polymorphic_url(MyEngine::Article.new) #=> "articles_path"
@@ -266,7 +266,7 @@ module Rails
# text_field :title #=>
# end
#
- # Additionaly isolated engine will set its name according to namespace, so
+ # Additionally isolated engine will set its name according to namespace, so
# MyEngine::Engine.engine_name #=> "my_engine". It will also set MyEngine.table_name_prefix
# to "my_engine_", changing MyEngine::Article model to use my_engine_article table.
#
diff --git a/railties/lib/rails/generators/rails/plugin_new/templates/test/test_helper.rb b/railties/lib/rails/generators/rails/plugin_new/templates/test/test_helper.rb
index 791b901593..dcd3b276e3 100644
--- a/railties/lib/rails/generators/rails/plugin_new/templates/test/test_helper.rb
+++ b/railties/lib/rails/generators/rails/plugin_new/templates/test/test_helper.rb
@@ -1,4 +1,4 @@
-# Configure Rails Envinronment
+# Configure Rails Environment
ENV["RAILS_ENV"] = "test"
require File.expand_path("../dummy/config/environment.rb", __FILE__)
diff --git a/railties/lib/rails/generators/resource_helpers.rb b/railties/lib/rails/generators/resource_helpers.rb
index d6ccfc496a..de01c858dd 100644
--- a/railties/lib/rails/generators/resource_helpers.rb
+++ b/railties/lib/rails/generators/resource_helpers.rb
@@ -53,7 +53,7 @@ module Rails
@controller_i18n_scope ||= controller_file_path.gsub('/', '.')
end
- # Loads the ORM::Generators::ActiveModel class. This class is responsable
+ # Loads the ORM::Generators::ActiveModel class. This class is responsible
# to tell scaffold entities how to generate an specific method for the
# ORM. Check Rails::Generators::ActiveModel for more information.
def orm_class
diff --git a/railties/lib/rails/railtie/configuration.rb b/railties/lib/rails/railtie/configuration.rb
index afeceafb67..e4368866a1 100644
--- a/railties/lib/rails/railtie/configuration.rb
+++ b/railties/lib/rails/railtie/configuration.rb
@@ -18,7 +18,7 @@ module Rails
# This allows you to modify application's generators from Railties.
#
- # Values set on app_generators will become defaults for applicaiton, unless
+ # Values set on app_generators will become defaults for application, unless
# application overwrites them.
def app_generators
@@app_generators ||= Rails::Configuration::Generators.new
--
cgit v1.2.3
From 22faa2c86d07711221732960b1ccf30b176116c5 Mon Sep 17 00:00:00 2001
From: Akira Matsuda
Date: Sun, 6 Mar 2011 03:29:23 +0900
Subject: wrong SQL statement
---
railties/guides/source/active_record_querying.textile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'railties')
diff --git a/railties/guides/source/active_record_querying.textile b/railties/guides/source/active_record_querying.textile
index 64a68f7592..ed3968e226 100644
--- a/railties/guides/source/active_record_querying.textile
+++ b/railties/guides/source/active_record_querying.textile
@@ -420,7 +420,7 @@ Client.limit(5).offset(30)
will return instead a maximum of 5 clients beginning with the 31st. The SQL looks like:
-SELECT * FROM clients LIMIT 5, 30
+SELECT * FROM clients LIMIT 5 OFFSET 30
h3. Group
--
cgit v1.2.3