A less destructive approach would be to use Ruby 2.0's named arguments to have 
something like:

link_to url: @person, body: "Click me"

That being said, I understand your point, but don't see it as a particular pain.

On Mar 15, 2013, at 12:58 PM, Michael Grohn wrote:

> I think the link_to helper method is quite confusing with its arguments order:
> 
>     link_to body, url
>     link_to "Click me", @person
> 
> Why is it thay way round? I want to make a "link to [the] person", so I would 
> expect the order to be:
> 
>     link_to @person, "Click me"
> 
> It reads much more natural. You don't "link to [the] body", you "link to 
> [the] url". So the order schould be
> 
>     link_to url, body, options={}
> 
> Is there a rationale for the current arguments order?
> 
> I know, changing it would break compatibility but I think it's worth 
> considering.
> 
> - Michael
> 
> -- 
> 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+unsubscr...@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?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

Cumprimentos,
Luís Ferreira



-- 
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+unsubscr...@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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to