Module: StandardAPI::Helpers

Defined in:
lib/standard_api/helpers.rb

Instance Method Summary collapse

Instance Method Details

#model_partial(record) ⇒ Object



4
5
6
7
8
9
10
# File 'lib/standard_api/helpers.rb', line 4

def model_partial(record)
  if lookup_context.exists?(record.model_name.element, record.model_name.plural, true)
    [record.model_name.plural, record.model_name.element].join('/')
  else
    'application/record'
  end
end