On May 5, 2012, at 21:34 , Neal Clark wrote:
>> Yeah I agree completely. I've just used multiple bundles in that case
>> (multiple manifest files in the asset pipeline). That way the static stuff
>> can still be served from Nginx or the CDN, rather than the app. Very
>> interested to hear other creative approaches - the method that Rafael/Peter
>> brought up totally changed and improved the way I organize static assets.
FWIW, I've always had a couple of different yields at the bottom of the body of
my layouts, like this:
<%= yield :page_bottom %>
$(function() {
<%= yield :startup %>
})
I'll have a standard javascript include above that. And then, if I want to
include different javascript on certain pages, I just drop it into
:page_bottom. If I want to run stuff out of the standard javascript includes a
certain way on certain pages, I'll drop a couple of lines of javascript into my
:startup block.
I wasn't clear on what the benefit of all the bureaucracy in this whole "DOM
routing" library was, but I didn't think I heard anything I couldn't do with
this simple scheme.
--
SD Ruby mailing list
[email protected]
http://groups.google.com/group/sdruby