Module: Headcount::Support

Defined in:
lib/headcount/support.rb

Class Method Summary collapse

Class Method Details

.key_for(query, path = []) ⇒ Object



10
11
12
13
14
15
16
17
18
# File 'lib/headcount/support.rb', line 10

def key_for(query, path = [])
  key = lookup_key(query)
  
  # if path.empty?
  #           key.pluralize
  #         else
  #           path.reverse.map {|key| key.singularize}
  key
end

.timestamp_for(time) ⇒ Object



6
7
8
# File 'lib/headcount/support.rb', line 6

def timestamp_for(time)
  time.strftime(Headcount.settings.timestamp)
end