Rails Recipes

Rails Recipes

I’m currently trying to figure out this piece of code from page 95 (Recipe 28):

<%= link_to result.send(@display_as), send(@display_path, result) %>

I don’t understand what’s the second argument to this link_to doing. The 1st argument it’s a call to the send method on the result object, which is pretty obvious, But the second argument is a call to the send method without a target object which is really confusing to me.