Class: Archangel::Site

Inherits:
ApplicationRecord show all
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


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

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


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

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