Class: Site
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Site
- Defined in:
- app/models/site.rb
Overview
Site is used to store the global configuration. Example:
Site.config[:host] = 'example.com'
Site.save!
Class Method Summary collapse
Class Method Details
.current ⇒ Object
11 12 13 14 |
# File 'app/models/site.rb', line 11 def current @current ||= first || create! end |