]> projects.mako.cc - selectricity-live/blob - app/controllers/application.rb
ignore vendor/plugins/sitealizer/lib/last_update
[selectricity-live] / app / controllers / application.rb
1 # Filters added to this controller will be run for all controllers in the application.
2 # Likewise, all the methods added will be available for all controllers.
3
4 class ApplicationController < ActionController::Base
5   include AuthenticatedSystem
6   helper :user
7   require_dependency "user"
8   before_filter :add_stylesheets
9    
10   def initialize
11     @stylesheets = []
12   end
13             
14   def add_stylesheets
15     file = "#{Dir.pwd}/public/stylesheets/#{controller_name}.css"
16     if File.exists? file
17       @stylesheets << controller_name
18     end
19   end
20
21 end

Benjamin Mako Hill || Want to submit a patch?