Stylesheet/javascript management rails 3 -
the application writing pretty complex , has different stylesheets/javascripts depending on action. right have added methods application controller allows me build array used in application.html.erb layout. feels little sloppy. nice somehow configure settings file based on action or something. (i guess might messy though)
any ideas?
def initialize super() @application_stylesheets = array.new @application_javascripts = array.new end def add_stylesheet(stylesheet) @application_stylesheets.push(stylesheet) end def add_javascript(javascript) @application_javascripts.push(javascript) end
Comments
Post a Comment