Permalink
Browse files

gsub("css", "CSS") and assorted improvements

  • Loading branch information...
1 parent 69597df commit 55b995ba6bafdddd01dc8fe6591aaada6e03197f @fxn fxn committed May 19, 2008
View
24 actionpack/lib/action_view/helpers/asset_tag_helper.rb
@@ -11,8 +11,8 @@ module Helpers #:nodoc:
# === Using asset hosts
# By default, Rails links to these assets on the current host in the public
# folder, but you can direct Rails to link to assets from a dedicated assets server by
- # setting ActionController::Base.asset_host in your environment.rb. For example,
- # let's say your asset host is assets.example.com.
+ # setting ActionController::Base.asset_host in your <tt>config/environment.rb</tt>. For example,
+ # let's say your asset host is <tt>assets.example.com</tt>.
#
# ActionController::Base.asset_host = "assets.example.com"
# image_tag("rails.png")
@@ -22,8 +22,8 @@ module Helpers #:nodoc:
#
# This is useful since browsers typically open at most two connections to a single host,
# which means your assets often wait in single file for their turn to load. You can
- # alleviate this by using a %d wildcard in <tt>asset_host</tt> (for example, "assets%d.example.com")
- # to automatically distribute asset requests among four hosts (e.g., assets0.example.com through assets3.example.com)
+ # alleviate this by using a <tt>%d</tt> wildcard in <tt>asset_host</tt> (for example, "assets%d.example.com")
+ # to automatically distribute asset requests among four hosts (e.g., "assets0.example.com" through "assets3.example.com")
# so browsers will open eight connections rather than two.
#
# image_tag("rails.png")
@@ -293,9 +293,9 @@ def self.reset_javascript_include_default #:nodoc:
end
# Computes the path to a stylesheet asset in the public stylesheets directory.
- # If the +source+ filename has no extension, .css will be appended.
+ # If the +source+ filename has no extension, <tt>.css</tt> will be appended.
# Full paths from the document root will be passed through.
- # Used internally by stylesheet_link_tag to build the stylesheet path.
+ # Used internally by +stylesheet_link_tag+ to build the stylesheet path.
#
# ==== Examples
# stylesheet_path "style" # => /stylesheets/style.css
@@ -309,7 +309,7 @@ def stylesheet_path(source)
alias_method :path_to_stylesheet, :stylesheet_path # aliased to avoid conflicts with a stylesheet_path named route
# Returns a stylesheet link tag for the sources specified as arguments. If
- # you don't specify an extension, .css will be appended automatically.
+ # you don't specify an extension, <tt>.css</tt> will be appended automatically.
# You can modify the link attributes by passing a hash as the last argument.
#
# ==== Examples
@@ -379,7 +379,7 @@ def stylesheet_link_tag(*sources)
# Computes the path to an image asset in the public images directory.
# Full paths from the document root will be passed through.
- # Used internally by image_tag to build the image path.
+ # Used internally by +image_tag+ to build the image path.
#
# ==== Examples
# image_path("edit") # => /images/edit
@@ -454,8 +454,8 @@ def file_exist?(path)
end
end
- # Add the .ext if not present. Return full URLs otherwise untouched.
- # Prefix with /dir/ if lacking a leading /. Account for relative URL
+ # Add the the extension +ext+ if not present. Return full URLs otherwise untouched.
+ # Prefix with <tt>/dir/</tt> if lacking a leading +/+. Account for relative URL
# roots. Rewrite the asset path for cache-busting asset ids. Include
# asset host, if configured, with the correct request protocol.
def compute_public_path(source, dir, ext = nil, include_host = true)
@@ -502,9 +502,9 @@ def compute_public_path(source, dir, ext = nil, include_host = true)
end
end
- # Pick an asset host for this source. Returns nil if no host is set,
+ # Pick an asset host for this source. Returns +nil+ if no host is set,
# the host if no wildcard is set, the host interpolated with the
- # numbers 0-3 if it contains %d (the number is the source hash mod 4),
+ # numbers 0-3 if it contains <tt>%d</tt> (the number is the source hash mod 4),
# or the value returned from invoking the proc if it's a proc.
def compute_asset_host(source)
if host = ActionController::Base.asset_host
View
2 actionpack/lib/action_view/helpers/sanitize_helper.rb
@@ -194,7 +194,7 @@ def sanitized_allowed_css_properties=(attributes)
HTML::WhiteListSanitizer.allowed_css_properties.merge(attributes)
end
- # Adds to the Set of allowed css keywords for the +sanitize+ and +sanitize_css+ helpers.
+ # Adds to the Set of allowed CSS keywords for the +sanitize+ and +sanitize_css+ helpers.
#
# Rails::Initializer.run do |config|
# config.action_view.sanitized_allowed_css_keywords = 'expression'
View
2 railties/test/generators/generator_test_helper.rb
@@ -206,7 +206,7 @@ def assert_generated_module(path)
end
end
- # Asserts that the given css stylesheet file was generated.
+ # Asserts that the given CSS stylesheet file was generated.
# It takes a path without the <tt>.css</tt> part.
# The contents of the stylesheet source file is passed to a block.
def assert_generated_stylesheet(path)

0 comments on commit 55b995b

Please sign in to comment.