Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
class FooController < ApplicationController
before_filter :include_scripts
protected
def include_scripts
include_tags = render_to_string( :partial => 'editor/head_elements' )
# um, see e.g. layout.rb line 254 in Rails 2.1.0. content_for variables have the form @content_for_<name>
@template.instance_variable_set("@content_for_head", include_tags )
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.