Skip to content
This repository
Browse code

Fix documentation mistakes

  • Loading branch information...
commit 2033db171ad88d0cbee719cd603bf76aa3dda5a9 1 parent 937a825
Janko Marohnić authored August 21, 2012
84  actionpack/lib/action_view/helpers/asset_tag_helper.rb
@@ -209,18 +209,18 @@ module AssetTagHelper
209 209
       # * <tt>:title</tt>  - Specify the title of the link, defaults to the +type+
210 210
       #
211 211
       # ==== Examples
212  
-      #  auto_discovery_link_tag # =>
213  
-      #     <link rel="alternate" type="application/rss+xml" title="RSS" href="http://www.currenthost.com/controller/action" />
214  
-      #  auto_discovery_link_tag(:atom) # =>
215  
-      #     <link rel="alternate" type="application/atom+xml" title="ATOM" href="http://www.currenthost.com/controller/action" />
216  
-      #  auto_discovery_link_tag(:rss, {:action => "feed"}) # =>
217  
-      #     <link rel="alternate" type="application/rss+xml" title="RSS" href="http://www.currenthost.com/controller/feed" />
218  
-      #  auto_discovery_link_tag(:rss, {:action => "feed"}, {:title => "My RSS"}) # =>
219  
-      #     <link rel="alternate" type="application/rss+xml" title="My RSS" href="http://www.currenthost.com/controller/feed" />
220  
-      #  auto_discovery_link_tag(:rss, {:controller => "news", :action => "feed"}) # =>
221  
-      #     <link rel="alternate" type="application/rss+xml" title="RSS" href="http://www.currenthost.com/news/feed" />
222  
-      #  auto_discovery_link_tag(:rss, "http://www.example.com/feed.rss", {:title => "Example RSS"}) # =>
223  
-      #     <link rel="alternate" type="application/rss+xml" title="Example RSS" href="http://www.example.com/feed" />
  212
+      #  auto_discovery_link_tag
  213
+      #  # => <link rel="alternate" type="application/rss+xml" title="RSS" href="http://www.currenthost.com/controller/action" />
  214
+      #  auto_discovery_link_tag(:atom)
  215
+      #  # => <link rel="alternate" type="application/atom+xml" title="ATOM" href="http://www.currenthost.com/controller/action" />
  216
+      #  auto_discovery_link_tag(:rss, {:action => "feed"})
  217
+      #  # => <link rel="alternate" type="application/rss+xml" title="RSS" href="http://www.currenthost.com/controller/feed" />
  218
+      #  auto_discovery_link_tag(:rss, {:action => "feed"}, {:title => "My RSS"})
  219
+      #  # => <link rel="alternate" type="application/rss+xml" title="My RSS" href="http://www.currenthost.com/controller/feed" />
  220
+      #  auto_discovery_link_tag(:rss, {:controller => "news", :action => "feed"})
  221
+      #  # => <link rel="alternate" type="application/rss+xml" title="RSS" href="http://www.currenthost.com/news/feed" />
  222
+      #  auto_discovery_link_tag(:rss, "http://www.example.com/feed.rss", {:title => "Example RSS"})
  223
+      #  # => <link rel="alternate" type="application/rss+xml" title="Example RSS" href="http://www.example.com/feed" />
224 224
       def auto_discovery_link_tag(type = :rss, url_options = {}, tag_options = {})
225 225
         tag(
226 226
           "link",
@@ -360,18 +360,18 @@ def font_url(source)
360 360
       #   width="30" and height="45". <tt>:size</tt> will be ignored if the
361 361
       #   value is not in the correct format.
362 362
       #
363  
-      #  image_tag("icon")  # =>
364  
-      #    <img src="/assets/icon" alt="Icon" />
365  
-      #  image_tag("icon.png")  # =>
366  
-      #    <img src="/assets/icon.png" alt="Icon" />
367  
-      #  image_tag("icon.png", :size => "16x10", :alt => "Edit Entry")  # =>
368  
-      #    <img src="/assets/icon.png" width="16" height="10" alt="Edit Entry" />
369  
-      #  image_tag("/icons/icon.gif", :size => "16x16")  # =>
370  
-      #    <img src="/icons/icon.gif" width="16" height="16" alt="Icon" />
371  
-      #  image_tag("/icons/icon.gif", :height => '32', :width => '32') # =>
372  
-      #    <img alt="Icon" height="32" src="/icons/icon.gif" width="32" />
373  
-      #  image_tag("/icons/icon.gif", :class => "menu_icon") # =>
374  
-      #    <img alt="Icon" class="menu_icon" src="/icons/icon.gif" />
  363
+      #  image_tag("icon")
  364
+      #  # => <img src="/assets/icon" alt="Icon" />
  365
+      #  image_tag("icon.png")
  366
+      #  # => <img src="/assets/icon.png" alt="Icon" />
  367
+      #  image_tag("icon.png", :size => "16x10", :alt => "Edit Entry")
  368
+      #  # => <img src="/assets/icon.png" width="16" height="10" alt="Edit Entry" />
  369
+      #  image_tag("/icons/icon.gif", :size => "16x16")
  370
+      #  # => <img src="/icons/icon.gif" width="16" height="16" alt="Icon" />
  371
+      #  image_tag("/icons/icon.gif", :height => '32', :width => '32')
  372
+      #  # => <img alt="Icon" height="32" src="/icons/icon.gif" width="32" />
  373
+      #  image_tag("/icons/icon.gif", :class => "menu_icon")
  374
+      #  # => <img alt="Icon" class="menu_icon" src="/icons/icon.gif" />
375 375
       def image_tag(source, options={})
376 376
         options = options.symbolize_keys
377 377
 
@@ -408,24 +408,24 @@ def image_alt(src)
408 408
       #   width="30" and height="45". <tt>:size</tt> will be ignored if the
409 409
       #   value is not in the correct format.
410 410
       #
411  
-      #  video_tag("trailer")  # =>
412  
-      #    <video src="/videos/trailer" />
413  
-      #  video_tag("trailer.ogg")  # =>
414  
-      #    <video src="/videos/trailer.ogg" />
415  
-      #  video_tag("trailer.ogg", :controls => true, :autobuffer => true)  # =>
416  
-      #    <video autobuffer="autobuffer" controls="controls" src="/videos/trailer.ogg" />
417  
-      #  video_tag("trailer.m4v", :size => "16x10", :poster => "screenshot.png")  # =>
418  
-      #    <video src="/videos/trailer.m4v" width="16" height="10" poster="/assets/screenshot.png" />
419  
-      #  video_tag("/trailers/hd.avi", :size => "16x16")  # =>
420  
-      #    <video src="/trailers/hd.avi" width="16" height="16" />
421  
-      #  video_tag("/trailers/hd.avi", :height => '32', :width => '32') # =>
422  
-      #    <video height="32" src="/trailers/hd.avi" width="32" />
423  
-      #  video_tag("trailer.ogg", "trailer.flv") # =>
424  
-      #    <video><source src="/videos/trailer.ogg" /><source src="/videos/trailer.flv" /></video>
425  
-      #  video_tag(["trailer.ogg", "trailer.flv"]) # =>
426  
-      #    <video><source src="/videos/trailer.ogg" /><source src="/videos/trailer.flv" /></video>
427  
-      #  video_tag(["trailer.ogg", "trailer.flv"], :size => "160x120") # =>
428  
-      #    <video height="120" width="160"><source src="/videos/trailer.ogg" /><source src="/videos/trailer.flv" /></video>
  411
+      #  video_tag("trailer")
  412
+      #  # => <video src="/videos/trailer" />
  413
+      #  video_tag("trailer.ogg")
  414
+      #  # => <video src="/videos/trailer.ogg" />
  415
+      #  video_tag("trailer.ogg", :controls => true, :autobuffer => true)
  416
+      #  # => <video autobuffer="autobuffer" controls="controls" src="/videos/trailer.ogg" />
  417
+      #  video_tag("trailer.m4v", :size => "16x10", :poster => "screenshot.png")
  418
+      #  # => <video src="/videos/trailer.m4v" width="16" height="10" poster="/assets/screenshot.png" />
  419
+      #  video_tag("/trailers/hd.avi", :size => "16x16")
  420
+      #  # => <video src="/trailers/hd.avi" width="16" height="16" />
  421
+      #  video_tag("/trailers/hd.avi", :height => '32', :width => '32')
  422
+      #  # => <video height="32" src="/trailers/hd.avi" width="32" />
  423
+      #  video_tag("trailer.ogg", "trailer.flv")
  424
+      #  # => <video><source src="/videos/trailer.ogg" /><source src="/videos/trailer.flv" /></video>
  425
+      #  video_tag(["trailer.ogg", "trailer.flv"])
  426
+      #  # => <video><source src="/videos/trailer.ogg" /><source src="/videos/trailer.flv" /></video>
  427
+      #  video_tag(["trailer.ogg", "trailer.flv"], :size => "160x120")
  428
+      #  # => <video height="120" width="160"><source src="/videos/trailer.ogg" /><source src="/videos/trailer.flv" /></video>
429 429
       def video_tag(*sources)
430 430
         multiple_sources_tag('video', sources) do |options|
431 431
           options[:poster] = path_to_image(options[:poster]) if options[:poster]
6  actionpack/lib/action_view/helpers/form_helper.rb
@@ -720,15 +720,15 @@ def fields_for(record_name, record_object = nil, options = {}, &block)
720 720
       #   label(:post, :title)
721 721
       #   # => <label for="post_title">Title</label>
722 722
       #
723  
-      #   You can localize your labels based on model and attribute names.
724  
-      #   For example you can define the following in your locale (e.g. en.yml)
  723
+      # You can localize your labels based on model and attribute names.
  724
+      # For example you can define the following in your locale (e.g. en.yml)
725 725
       #
726 726
       #   helpers:
727 727
       #     label:
728 728
       #       post:
729 729
       #         body: "Write your entire text here"
730 730
       #
731  
-      #   Which then will result in
  731
+      # Which then will result in
732 732
       #
733 733
       #   label(:post, :body)
734 734
       #   # => <label for="post_body">Write your entire text here</label>

0 notes on commit 2033db1

Please sign in to comment.
Something went wrong with that request. Please try again.