-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
actionview: Make a block to url helpers optional
These helper methods can be called without block. So it would be better to declare as optional.
- Loading branch information
Showing
1 changed file
with
6 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -163,7 +163,7 @@ module ActionView | |
# | ||
# link_to "External link", "http://www.rubyonrails.org/", target: "_blank", rel: "nofollow" | ||
# # => <a href="http://www.rubyonrails.org/" target="_blank" rel="nofollow">External link</a> | ||
def link_to: (?untyped? name, ?untyped? options, ?untyped? html_options) { () -> untyped } -> untyped | ||
def link_to: (?untyped? name, ?untyped? options, ?untyped? html_options) ?{ () -> untyped } -> untyped | ||
|
||
# Generates a form containing a single button that submits to the URL created | ||
# by the set of +options+. This is the safest method to ensure links that | ||
|
@@ -257,7 +257,7 @@ module ActionView | |
# # <input name="authenticity_token" type="hidden" value="10f2163b45388899ad4d5ae948988266befcb6c3d1b2451cf657a0c293d605a6"/> | ||
# # </form>" | ||
# # | ||
def button_to: (?untyped? name, ?untyped? options, ?untyped? html_options) { () -> untyped } -> untyped | ||
def button_to: (?untyped? name, ?untyped? options, ?untyped? html_options) ?{ () -> untyped } -> untyped | ||
|
||
# Creates a link tag of the given +name+ using a URL created by the set of | ||
# +options+ unless the current request URI is the same as the links, in | ||
|
@@ -297,7 +297,7 @@ module ActionView | |
# link_to("Go back", { controller: "posts", action: "index" }) | ||
# end | ||
# %> | ||
def link_to_unless_current: (untyped name, ?::Hash[untyped, untyped] options, ?::Hash[untyped, untyped] html_options) { () -> untyped } -> untyped | ||
def link_to_unless_current: (untyped name, ?::Hash[untyped, untyped] options, ?::Hash[untyped, untyped] html_options) ?{ () -> untyped } -> untyped | ||
|
||
# Creates a link tag of the given +name+ using a URL created by the set of | ||
# +options+ unless +condition+ is true, in which case only the name is | ||
|
@@ -319,7 +319,7 @@ module ActionView | |
# # => <a href="/controller/reply/">Reply</a> | ||
# # If not... | ||
# # => <a href="/accounts/signup">Reply</a> | ||
def link_to_unless: (untyped condition, untyped name, ?::Hash[untyped, untyped] options, ?::Hash[untyped, untyped] html_options) { () -> untyped } -> untyped | ||
def link_to_unless: (untyped condition, untyped name, ?::Hash[untyped, untyped] options, ?::Hash[untyped, untyped] html_options) ?{ () -> untyped } -> untyped | ||
|
||
# Creates a link tag of the given +name+ using a URL created by the set of | ||
# +options+ if +condition+ is true, otherwise only the name is | ||
|
@@ -341,7 +341,7 @@ module ActionView | |
# # => <a href="/sessions/new/">Login</a> | ||
# # If they are logged in... | ||
# # => <a href="/accounts/show/3">my_username</a> | ||
def link_to_if: (untyped condition, untyped name, ?::Hash[untyped, untyped] options, ?::Hash[untyped, untyped] html_options) { () -> untyped } -> untyped | ||
def link_to_if: (untyped condition, untyped name, ?::Hash[untyped, untyped] options, ?::Hash[untyped, untyped] html_options) ?{ () -> untyped } -> untyped | ||
|
||
# Creates a mailto link tag to the specified +email_address+, which is | ||
# also used as the name of the link unless +name+ is specified. Additional | ||
|
@@ -381,7 +381,7 @@ module ActionView | |
# # => <a href="mailto:[email protected]"> | ||
# <strong>Email me:</strong> <span>[email protected]</span> | ||
# </a> | ||
def mail_to: (untyped email_address, ?untyped? name, ?::Hash[untyped, untyped] html_options) { () -> untyped } -> untyped | ||
def mail_to: (untyped email_address, ?untyped? name, ?::Hash[untyped, untyped] html_options) ?{ () -> untyped } -> untyped | ||
|
||
# True if the current request URI was generated by the given +options+. | ||
# | ||
|