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
application.html.erb

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

I tried :

%head
:javascript
= yield :document_ready


%head
:javascript
'<%= yield :document_ready %>'

but no way , the yield :document_ready is never executed

feedback welcome

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Search Discussions

  • Aziz Bookwala at Apr 23, 2012 at 2:49 am
    Hi Erwin

    This should work:
    %head
    = yield :document_ready

    On Sun, Apr 22, 2012 at 6:05 PM, Erwin wrote:

    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
    application.html.erb

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

    I tried :

    %head
    :javascript
    = yield :document_ready


    %head
    :javascript
    '<%= yield :document_ready %>'

    but no way , the yield :document_ready is never executed

    feedback welcome

    --
    You received this message because you are subscribed to the Google Groups
    "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to
    rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at
    http://groups.google.com/group/rubyonrails-talk?hl=en.

    --
    - Aziz M. Bookwala

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedApr 22, '12 at 12:35p
activeApr 23, '12 at 2:49a
posts2
users2
websiterubyonrails.org
irc#RubyOnRails

2 users in discussion

Aziz Bookwala: 1 post Erwin: 1 post

People

Translate

site design / logo © 2022 Grokbase