how to insert a javascript block in my haml %head , containing erb

X-posted with Haml group, as I don't know which group it should be
posted ...

I am trying to insert this block ( which is inning fine in an

       <script type="text/javascript">
            $(function() {
               <%= yield :document_ready %>

I tried :

             = yield :document_ready

             '<%= yield :document_ready %>'

but no way , the yield :document_ready is never executed

feedback welcome

Hi Erwin

This should work:
       = yield :document_ready