Skip to content

Commit

Permalink
Backport of documentation fixes:
Browse files Browse the repository at this point in the history
  • Loading branch information
pixeltrix committed Oct 29, 2010
1 parent f73a3e6 commit ddf7360
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion actionpack/lib/action_view/base.rb
Expand Up @@ -156,7 +156,7 @@ class NonConcattingString < ActiveSupport::SafeBuffer
#
# This refreshes the sidebar, removes a person element and highlights the user list.
#
# See the ActionView::Helpers::PrototypeHelper::GeneratorMethods documentation for more details.
# See the ActionView::Helpers::PrototypeHelper::JavaScriptGenerator::GeneratorMethods documentation for more details.
class Base
module Subclasses
end
Expand Down
3 changes: 2 additions & 1 deletion actionpack/lib/action_view/helpers/javascript_helper.rb
Expand Up @@ -65,7 +65,8 @@ def escape_javascript(javascript)
# //]]>
# </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>
#
Expand Down
8 changes: 4 additions & 4 deletions actionpack/lib/action_view/helpers/prototype_helper.rb
Expand Up @@ -161,7 +161,7 @@ def include_helpers_from_context

# 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
# 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
Expand Down Expand Up @@ -224,7 +224,7 @@ def include_helpers_from_context
#
# 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|
Expand Down Expand Up @@ -582,11 +582,11 @@ def update_page(&block)
JavaScriptGenerator.new(view_context, &block).to_s.html_safe
end

# Works like update_page but wraps the generated JavaScript in a <script>
# 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
# +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
Expand Down
4 changes: 2 additions & 2 deletions activemodel/lib/active_model/validator.rb
Expand Up @@ -7,7 +7,7 @@ module ActiveModel #:nodoc:
# == Active Model Validator
#
# A simple base class that can be used along with
# +ActiveModel::Validations::ClassMethods.validates_with+
# ActiveModel::Validations::ClassMethods.validates_with
#
# class Person
# include ActiveModel::Validations
Expand Down Expand Up @@ -42,7 +42,7 @@ module ActiveModel #:nodoc:
# end
# end
#
# To cause a validation error, you must add to the <tt>record<tt>'s errors directly
# To cause a validation error, you must add to the <tt>record</tt>'s errors directly
# from within the validators message
#
# class MyValidator < ActiveModel::Validator
Expand Down
2 changes: 1 addition & 1 deletion activeresource/test/cases/base/schema_test.rb
Expand Up @@ -399,7 +399,7 @@ def teardown
assert_not_equal matz.known_attributes, rick.known_attributes, "should have had different known attributes too"
end

test "setting schema then fetching should add schema attributes to the intance attributes" do
test "setting schema then fetching should add schema attributes to the instance attributes" do
# an attribute in common with fetched instance and one that isn't
new_schema = {'name' => 'string', 'my_strange_attribute' => 'string'}

Expand Down

0 comments on commit ddf7360

Please sign in to comment.