aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2010-09-14 20:07:29 +0200
committerXavier Noria <fxn@hashref.com>2010-09-14 20:07:29 +0200
commitdd6efe98b62946ae4d4df0672292449226b8d6fc (patch)
tree8854f46462eacc6355ca6f8da3d7111a57e036ea
parent9362ef6e21e44341a5ef9d85ece468f407357ceb (diff)
parentb59a8d42c300651ad3384d4dab326454c088cbcc (diff)
downloadrails-dd6efe98b62946ae4d4df0672292449226b8d6fc.tar.gz
rails-dd6efe98b62946ae4d4df0672292449226b8d6fc.tar.bz2
rails-dd6efe98b62946ae4d4df0672292449226b8d6fc.zip
Merge remote branch 'docrails/master'
-rw-r--r--actionpack/lib/action_view/helpers/javascript_helper.rb3
-rw-r--r--actionpack/lib/action_view/helpers/prototype_helper.rb16
-rw-r--r--activesupport/lib/active_support/dependencies.rb6
-rw-r--r--railties/guides/source/testing.textile7
-rw-r--r--railties/lib/rails/generators/rails/app/templates/config/environments/development.rb.tt2
-rw-r--r--railties/lib/rails/generators/rails/app/templates/config/environments/production.rb.tt2
-rw-r--r--railties/lib/rails/generators/rails/app/templates/config/environments/test.rb.tt2
7 files changed, 19 insertions, 19 deletions
diff --git a/actionpack/lib/action_view/helpers/javascript_helper.rb b/actionpack/lib/action_view/helpers/javascript_helper.rb
index 84f53b842c..f392d92e75 100644
--- a/actionpack/lib/action_view/helpers/javascript_helper.rb
+++ b/actionpack/lib/action_view/helpers/javascript_helper.rb
@@ -65,7 +65,8 @@ module ActionView
# //]]>
# </script>
#
- # +html_options+ may be a hash of attributes for the <script> tag. Example:
+ # +html_options+ may be a hash of attributes for the <tt><script></tt>
+ # tag. Example:
# javascript_tag "alert('All is good')", :defer => 'defer'
# # => <script defer="defer" type="text/javascript">alert('All is good')</script>
#
diff --git a/actionpack/lib/action_view/helpers/prototype_helper.rb b/actionpack/lib/action_view/helpers/prototype_helper.rb
index b600666536..bc67197e64 100644
--- a/actionpack/lib/action_view/helpers/prototype_helper.rb
+++ b/actionpack/lib/action_view/helpers/prototype_helper.rb
@@ -161,8 +161,8 @@ module ActionView
# JavaScriptGenerator generates blocks of JavaScript code that allow you
# to change the content and presentation of multiple DOM elements. Use
- # this in your Ajax response bodies, either in a <script> tag or as plain
- # JavaScript sent with a Content-type of "text/javascript".
+ # this in your Ajax response bodies, either in a <tt><script></tt> tag
+ # or as plain JavaScript sent with a Content-type of "text/javascript".
#
# Create new instances with PrototypeHelper#update_page or with
# ActionController::Base#render, then call +insert_html+, +replace_html+,
@@ -224,7 +224,7 @@ module ActionView
#
# You can also use PrototypeHelper#update_page_tag instead of
# PrototypeHelper#update_page to wrap the generated JavaScript in a
- # <script> tag.
+ # <tt><script></tt> tag.
module GeneratorMethods
def to_s #:nodoc:
(@lines * $/).tap do |javascript|
@@ -582,12 +582,12 @@ module ActionView
JavaScriptGenerator.new(self, &block).to_s.html_safe
end
- # Works like update_page but wraps the generated JavaScript in a <script>
- # tag. Use this to include generated JavaScript in an ERb template.
- # See JavaScriptGenerator for more information.
+ # Works like update_page but wraps the generated JavaScript in a
+ # <tt><script></tt> tag. Use this to include generated JavaScript in an
+ # ERb template. See JavaScriptGenerator for more information.
#
- # +html_options+ may be a hash of <script> attributes to be passed
- # to ActionView::Helpers::JavaScriptHelper#javascript_tag.
+ # +html_options+ may be a hash of <tt><script></tt> attributes to be
+ # passed to ActionView::Helpers::JavaScriptHelper#javascript_tag.
def update_page_tag(html_options = {}, &block)
javascript_tag update_page(&block), html_options
end
diff --git a/activesupport/lib/active_support/dependencies.rb b/activesupport/lib/active_support/dependencies.rb
index dc6484f387..09bdb577ad 100644
--- a/activesupport/lib/active_support/dependencies.rb
+++ b/activesupport/lib/active_support/dependencies.rb
@@ -83,13 +83,13 @@ module ActiveSupport #:nodoc:
super { |h,k| h[k] = [] }
end
- # return a list of new constants found since the last call to watch_modules
+ # return a list of new constants found since the last call to watch_namespaces
def new_constants
constants = []
# Grab the list of namespaces that we're looking for new constants under
@watching.last.each do |namespace|
- # Retrieve the constants that were present under the namespace when watch_modules
+ # Retrieve the constants that were present under the namespace when watch_namespaces
# was originally called
original_constants = self[namespace].last
@@ -115,7 +115,7 @@ module ActiveSupport #:nodoc:
end
constants
ensure
- # A call to new_constants is always called after a call to watch_modules
+ # A call to new_constants is always called after a call to watch_namespaces
pop_modules(@watching.pop)
end
diff --git a/railties/guides/source/testing.textile b/railties/guides/source/testing.textile
index 6686dc3290..2355d2a31a 100644
--- a/railties/guides/source/testing.textile
+++ b/railties/guides/source/testing.textile
@@ -241,8 +241,7 @@ h4. Running Tests
Running a test is as simple as invoking the file containing the test cases through Ruby:
<shell>
-$ cd test
-$ ruby unit/post_test.rb
+$ ruby -Itest test/unit/post_test.rb
Loaded suite unit/post_test
Started
@@ -252,12 +251,12 @@ Finished in 0.023513 seconds.
1 tests, 1 assertions, 0 failures, 0 errors
</shell>
-This will run all the test methods from the test case.
+This will run all the test methods from the test case. Note that +test_helper.rb+ is in the +test+ directory, hence this directory needs to be added to the load path using the +-I+ switch.
You can also run a particular test method from the test case by using the +-n+ switch with the +test method name+.
<shell>
-$ ruby unit/post_test.rb -n test_truth
+$ ruby -Itest test/unit/post_test.rb -n test_truth
Loaded suite unit/post_test
Started
diff --git a/railties/lib/rails/generators/rails/app/templates/config/environments/development.rb.tt b/railties/lib/rails/generators/rails/app/templates/config/environments/development.rb.tt
index 7616614aff..91d3133ea4 100644
--- a/railties/lib/rails/generators/rails/app/templates/config/environments/development.rb.tt
+++ b/railties/lib/rails/generators/rails/app/templates/config/environments/development.rb.tt
@@ -1,5 +1,5 @@
<%= app_const %>.configure do
- # Settings specified here will take precedence over those in config/environment.rb
+ # Settings specified here will take precedence over those in config/application.rb
# In the development environment your application's code is reloaded on
# every request. This slows down response time but is perfect for development
diff --git a/railties/lib/rails/generators/rails/app/templates/config/environments/production.rb.tt b/railties/lib/rails/generators/rails/app/templates/config/environments/production.rb.tt
index 500fc4d860..89bb891ddd 100644
--- a/railties/lib/rails/generators/rails/app/templates/config/environments/production.rb.tt
+++ b/railties/lib/rails/generators/rails/app/templates/config/environments/production.rb.tt
@@ -1,5 +1,5 @@
<%= app_const %>.configure do
- # Settings specified here will take precedence over those in config/environment.rb
+ # Settings specified here will take precedence over those in config/application.rb
# The production environment is meant for finished, "live" apps.
# Code is not reloaded between requests
diff --git a/railties/lib/rails/generators/rails/app/templates/config/environments/test.rb.tt b/railties/lib/rails/generators/rails/app/templates/config/environments/test.rb.tt
index 26cdef071a..d8d1e55157 100644
--- a/railties/lib/rails/generators/rails/app/templates/config/environments/test.rb.tt
+++ b/railties/lib/rails/generators/rails/app/templates/config/environments/test.rb.tt
@@ -1,5 +1,5 @@
<%= app_const %>.configure do
- # Settings specified here will take precedence over those in config/environment.rb
+ # Settings specified here will take precedence over those in config/application.rb
# The test environment is used exclusively to run your application's
# test suite. You never need to work with it otherwise. Remember that