Class: OembedDomain

Inherits:
ApplicationRecord
  • Object
show all
Includes:
RequiredUniqueName
Defined in:
app/models/oembed_domain.rb

Overview

Domain for OEmbed receiver

Attributes:

name [String]
oembed_receiver_id [OembedReceiver]

Constant Summary collapse

NAME_LIMIT =
255

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.[](name) ⇒ Object

Parameters:

  • name (String)


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

def self.[](name)
  find_by(name: name.to_s.downcase)
end

Instance Method Details

#receiver_slugObject



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

def receiver_slug
  oembed_receiver&.slug
end