Class: SiteFramework::Site

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

#slug ⇒ Object

This method returns a slug for site title



10
11
12
13
14
15
16
17
# File 'app/models/site_framework/site.rb', line 10

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

end