Cosmetics
This commit is contained in:
parent
ee5dbcf33e
commit
e569bcb246
21 changed files with 54 additions and 65 deletions
|
|
@ -7,6 +7,11 @@ class Page < ApplicationRecord
|
|||
before_validation :set_position
|
||||
before_update :update_positions, if: :position_changed?
|
||||
|
||||
def full_url
|
||||
return nil if report.url.blank? && url.blank?
|
||||
|
||||
[ "https:/", report.url&.sub(/.*:\/\//, ""), url&.sub(/^\//, "") ].compact_blank.join("/")
|
||||
end
|
||||
|
||||
private
|
||||
def set_position
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue