Class: Stylesheet

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/stylesheet.rb

Constant Summary collapse

RESOURCES_DIR =
ENV["HEROKU_RACK"].blank? ? Rails.root.join("public") : "tmp"
STYLESHEETS_DIR =
ENV["HEROKU_RACK"].blank? ? File.join("system", "stylesheets").to_s : File.join("stylesheets").to_s

Instance Method Summary collapse

Instance Method Details

#relative_pathObject



16
17
18
# File 'app/models/stylesheet.rb', line 16

def relative_path
  File.join("/#{ STYLESHEETS_DIR}", "#{self.name}.css").to_s
end