Find how many yields and their names
Is there a way in Rails to find out how many yields have been defined in a layout along with their corresponding n开发者_运维问答ames?
grep -c yield < layout.html.erb
That should get you the count you're looking for.
or ack "yield" app/views/layouts/
. See Ack - Better thanGrep
精彩评论