3 ms·
rails has content_for (http://api.rubyonrails.org/classes/ActionView/Helpers/CaptureHelper.html#method-i-content_for http://api.rubyonrails.org/classes/ActionVi
by joevandyk 15y ago
rails has content_for (http://api.rubyonrails.org/classes/ActionView/Helpers/CaptureHelper.html#method-i-content_for http://api.rubyonrails.org/classes/ActionView/Helpers/Captur...) that helps with this.
- sams99 15y agotrue, still verbose, but more elegant than the solution in asp.net mvc
- riffraff 15y agoout of sheer curiosity, what is the asp.net mvc solution?
- sams99 15y agoMy current thinking is: http://snipt.org/uNq8 http://snipt.org/uNq8
- untog 15y agoIt doesn't really have one. Annoying, because it's 90% of the way there- views can insert code into specific "sections" of the template, but sub-views can't. If they just enabled that then you could make a "JS" section just before </body> and have all your JS inserted there.