Created
September 18, 2008 21:43
-
-
Save Bill/11486 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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