<?xml version="1.0" encoding="UTF-8"?>
<feed xml:lang="en-US" xmlns="http://www.w3.org/2005/Atom">
  <title>opensoul.org - Tip: Overriding link_to to accept a block Comments</title>
  <id>tag:www.opensoul.org,2008:/2006/8/4/tip-overriding-link_to-to-accept-a-block/comments</id>
  <generator uri="http://mephistoblog.com" version="0.7.3">Mephisto Noh-Varr</generator>
  <link href="http://www.opensoul.org/2006/8/4/tip-overriding-link_to-to-accept-a-block/comments.xml" rel="self" type="application/atom+xml"/>
  <link href="/2006/8/4/tip-overriding-link_to-to-accept-a-block" rel="alternate" type="text/html"/>
  <updated>2007-07-30T13:24:45Z</updated>
  <entry xml:base="http://www.opensoul.org/">
    <author>
      <name>silentboobo</name>
    </author>
    <id>tag:www.opensoul.org,2006-08-04:605:3299</id>
    <published>2007-07-30T13:24:45Z</published>
    <updated>2007-07-30T13:24:45Z</updated>
    <category term="work"/>
    <link href="http://www.opensoul.org/2006/8/4/tip-overriding-link_to-to-accept-a-block" rel="alternate" type="text/html"/>
    <title>Comment on 'Tip: Overriding link_to to accept a block' by silentboobo</title>
<content type="html">&lt;p&gt;What about this solution? http://nullstyle.com/2007/6/20/link_to-as-a-block-helper&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://www.opensoul.org/">
    <author>
      <name>xybre</name>
    </author>
    <id>tag:www.opensoul.org,2006-08-04:605:3086</id>
    <published>2007-06-19T22:29:35Z</published>
    <updated>2007-06-19T22:29:35Z</updated>
    <category term="work"/>
    <link href="http://www.opensoul.org/2006/8/4/tip-overriding-link_to-to-accept-a-block" rel="alternate" type="text/html"/>
    <title>Comment on 'Tip: Overriding link_to to accept a block' by xybre</title>
<content type="html">&lt;p&gt;Passing a block to link_to is cool, but there&#8217;s other ways. You could render the string and then pass it to link_to, or my favorite, use ternary operators and multiple lines until you make even perl programmer&#8217;s eyes bleed.&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://www.opensoul.org/">
    <author>
      <name>Rein Henrichs</name>
    </author>
    <id>tag:www.opensoul.org,2006-08-04:605:738</id>
    <published>2007-01-15T06:36:19Z</published>
    <updated>2007-01-15T06:36:19Z</updated>
    <category term="work"/>
    <link href="http://www.opensoul.org/2006/8/4/tip-overriding-link_to-to-accept-a-block" rel="alternate" type="text/html"/>
    <title>Comment on 'Tip: Overriding link_to to accept a block' by Rein Henrichs</title>
<content type="html">&lt;p&gt;I don&#8217;t really understand the usefulness. Surely a simple if/else/elsif statement would suffice. It would certainly be an improvement over the nested if/else statements used.&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://www.opensoul.org/">
    <author>
      <name>Seggy</name>
    </author>
    <id>tag:www.opensoul.org,2006-08-04:605:608</id>
    <published>2006-10-02T06:50:33Z</published>
    <updated>2006-10-02T06:50:33Z</updated>
    <category term="work"/>
    <link href="http://www.opensoul.org/2006/8/4/tip-overriding-link_to-to-accept-a-block" rel="alternate" type="text/html"/>
    <title>Comment on 'Tip: Overriding link_to to accept a block' by Seggy</title>
<content type="html">Oh great my WP comment inaptitude has been cruelly exposed!

Anyway, there's a where document after the eval, which is basically your code with #{method} as the method name.</content>  </entry>
  <entry xml:base="http://www.opensoul.org/">
    <author>
      <name>Seggy</name>
    </author>
    <id>tag:www.opensoul.org,2006-08-04:605:607</id>
    <published>2006-10-02T06:45:19Z</published>
    <updated>2006-10-02T06:45:19Z</updated>
    <category term="work"/>
    <link href="http://www.opensoul.org/2006/8/4/tip-overriding-link_to-to-accept-a-block" rel="alternate" type="text/html"/>
    <title>Comment on 'Tip: Overriding link_to to accept a block' by Seggy</title>
<content type="html">How about generating the code? Like maybe:

%w(link_to_remote link_to).each do |method|
eval</content>  </entry>
  <entry xml:base="http://www.opensoul.org/">
    <author>
      <name>Some performance and helper links</name>
    </author>
    <id>tag:www.opensoul.org,2006-08-04:605:606</id>
    <published>2006-08-20T12:46:45Z</published>
    <updated>2006-08-20T12:46:45Z</updated>
    <category term="work"/>
    <link href="http://www.opensoul.org/2006/8/4/tip-overriding-link_to-to-accept-a-block" rel="alternate" type="text/html"/>
    <title>Comment on 'Tip: Overriding link_to to accept a block' by Some performance and helper links</title>
<content type="html">[...] opensoul.org » Tip: Overriding link_to to accept a block [...]</content>  </entry>
</feed>
