Hi --

On Tue, 7 Aug 2007, Pit Capitain wrote:

> 2007/8/6, James Edward Gray II <james / grayproductions.net>:
>> On Aug 6, 2007, at 10:39 AM, Phlip wrote:
>>> What if the block were optional?
>>
>> You can use block_given? to find out if a block was provided.
>
> Yes, but not in the helper method. In the code I've shown there's
> always a block passed to the helper method. Phlip has a point here.

I still wouldn't use block.call automatically.  I'd stick to yield
until it becomes necessary to wrap it in the slower construct.


David

-- 
* Books:
   RAILS ROUTING (new! http://www.awprofessional.com/title/0321509242)
   RUBY FOR RAILS (http://www.manning.com/black)
* Ruby/Rails training
     & consulting:  Ruby Power and Light, LLC (http://www.rubypal.com)