Claudio B.
2014-Sep-23 17:03 UTC
Enhancement idea for API documentation: add signatures to overloaded methods
Hello fantastic Rails core team! Rails includes several methods that accept different sets of parameters. For instance, link_to can be invoked passing the *link text* either as the first parameter or as a block. While Yardoc has native support <http://rubydoc.info/gems/yard/file/docs/Tags.md#overload> for the @overload tag to deal with these methods, RDoc does not. Browsing through api.rubyonrails.org, I found that the way in which this is documented for Rails is using a *Signatures *block, as you can see here: http://api.rubyonrails.org/classes/ActionView/Helpers/UrlHelper.html#method-i-link_to The problem is that link_to is *the only method *that follows this convention in the entire API documentation. My question is whether you would like to stick to this convention for the other methods that can be overloaded and, if that's the case, if you would accept pull requests that add the *Signatures* block to the documentation of other methods that can be overloaded (for instance button_to). I think that would make the documentation even more helpful! -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-core+unsubscribe@googlegroups.com. To post to this group, send email to rubyonrails-core@googlegroups.com. Visit this group at http://groups.google.com/group/rubyonrails-core. For more options, visit https://groups.google.com/d/optout.