Class: WellKnown

Inherits:
ApplicationRecord show all
Defined in:
app/models/well_known.rb

Constant Summary collapse

CONTENT_TYPES =
{
  text: "text/plain",
  json: "application/json",
}.freeze

Instance Method Summary collapse

Instance Method Details

#formatObject



22
23
24
# File 'app/models/well_known.rb', line 22

def format
  content_type.to_sym
end

#render_in(view_context) ⇒ Object



18
19
20
# File 'app/models/well_known.rb', line 18

def render_in(view_context)
  view_context.render(plain: content)
end

#to_sObject



26
27
28
# File 'app/models/well_known.rb', line 26

def to_s
  name
end