Class: Link

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/link.rb

Class Method Summary collapse

Class Method Details

.clear_cached ⇒ Object



17
18
19
# File 'app/models/link.rb', line 17

def self.clear_cached
  @@memo = nil
end

.hash ⇒ Object



3
4
5
# File 'app/models/link.rb', line 3

def self.hash
  @@memo ||= make_hash
end

.make_hash ⇒ Object



8
9
10
11
12
13
14
# File 'app/models/link.rb', line 8

def self.make_hash
  hash = {}
  self.all.each do |link|
    hash[link.name] = link.location
  end
  hash
end