views:

27

answers:

2

Is there a way in Rails to find out how many yields have been defined in a layout along with their corresponding names?

A: 
grep -c yield < layout.html.erb

That should get you the count you're looking for.

Steve Ross
A: 

or ack "yield" app/views/layouts/. See Ack - Better thanGrep

Kunday