Class: SiteMapPathHistory
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- SiteMapPathHistory
- Defined in:
- app/models/site_map_path_history.rb
Overview
A prior path a SiteMap page was served at, retained when the page's URL
changes so an old URL can 301 to its current path instead of 404ing.
See doc/tasks/202606042115_SITEMAP_URL_HISTORY.md. Written by
SiteMap#record_path_history on a path change; read by the redirect resolver,
which looks up an incoming (locale, path) and redirects to the owning
SiteMap's current path.
Constant Summary
Constants included from Schedulable
Schedulable::SIMPLE_FORM_OPTIONS
Instance Attribute Summary collapse
- #locale ⇒ Object readonly
- #path ⇒ Object readonly
- #recorded_at ⇒ Object readonly
Belongs to collapse
Methods inherited from ApplicationRecord
ransackable_associations, ransackable_attributes, ransackable_scopes, ransortable_attributes, #to_relation
Methods included from Schedulable
Methods included from Models::AfterCommittable
Methods included from Models::EventPublishable
Instance Attribute Details
#locale ⇒ Object (readonly)
13 |
# File 'app/models/site_map_path_history.rb', line 13 validates :locale, :path, :recorded_at, presence: true |
#path ⇒ Object (readonly)
13 |
# File 'app/models/site_map_path_history.rb', line 13 validates :locale, :path, :recorded_at, presence: true |
#recorded_at ⇒ Object (readonly)
13 |
# File 'app/models/site_map_path_history.rb', line 13 validates :locale, :path, :recorded_at, presence: true |