class Ella::Controller

Sinatra was not specifically designed to have different modular controller files. Some of the magic needs to go here, and maintaining a specific loading order is important: seemingly insignificant changes can break the little hacks that allow Sinatra to be used as a macro-framework.

Public Instance Methods

css_path() click to toggle source
# File lib/ella/controller.rb, line 28
def css_path
  filename = Dir.glob("public/css/*").max_by {|f| File.mtime(f)}
  filename.sub('public', '')
end
js_path() click to toggle source

TODO: Some fancy-pants metaprogramming to allow for all user-defined pipelines.

# File lib/ella/controller.rb, line 23
def js_path
  filename = Dir.glob("public/js/*").max_by {|f| File.mtime(f)}
  filename.sub('public', '')
end