Class: Archangel::Site

Inherits:
ApplicationRecord show all
Includes:
Models::MetatagableConcern
Defined in:
app/models/archangel/site.rb

Overview

Site model

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.currentObject

Current site

Returns:

  • (Object)

    first availabe site as current site



45
46
47
48
49
# File 'app/models/archangel/site.rb', line 45

def self.current
  first_or_create do |site|
    site.name = "Archangel"
  end
end

Instance Method Details

#to_liquidObject

Liquid object for Site

Returns:

  • (Object)

    the Liquid object



56
57
58
# File 'app/models/archangel/site.rb', line 56

def to_liquid
  Archangel::Liquid::Drops::SiteDrop.new(self)
end