Skip to content

Commit

Permalink
actionview: Make a block to url helpers optional
Browse files Browse the repository at this point in the history
These helper methods can be called without block.  So it would be better
to declare as optional.
  • Loading branch information
tk0miya committed Jun 6, 2024
1 parent fd6b5f6 commit 6a6c44b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions gems/actionview/6.0/actionview.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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+.
#
Expand Down

0 comments on commit 6a6c44b

Please sign in to comment.