Class: SiteFramework::Site

Inherits:
Object
  • Object
show all
Includes:
Mongoid::Document, Mongoid::Timestamps
Defined in:
app/models/site_framework/site.rb

Overview

This model represent the Site entity.

SiteFramework::Middleware

will check for a site

with current domain of request and attach the object to global Rails object

Instance Method Summary collapse

Instance Method Details

#slugObject

This method returns a slug for site title



21
22
23
24
25
26
27
# File 'app/models/site_framework/site.rb', line 21

def slug
  if title
    title
  else
    # TODO: generate a sha1 hash base on time
  end
end