Class: UrlRewrite

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

Defined Under Namespace

Classes: StatusCode

Constant Summary collapse

STATUS_CODES =
[
  StatusCode.new(303, "See other"),
  StatusCode.new(307, "Temporary redirect"),
  StatusCode.new(308, "Permanent redirect"),
].freeze

Instance Method Summary collapse

Instance Method Details

#titleObject



30
31
32
# File 'app/models/url_rewrite.rb', line 30

def title
  from.delete_prefix("/")
end

#to_sObject



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

def to_s
  "#{from} -> #{to}"
end