Class: Site

Inherits:
ActiveRecord::Base
  • Object
show all
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

.currentObject



11
12
13
14
# File 'app/models/site.rb', line 11

def current
  @current ||=
    first || create!
end