mirror of
https://0xacab.org/sutty/sutty
synced 2025-02-23 04:31:49 +00:00
fix: sugerir la url actual como valor por defecto
This commit is contained in:
parent
b7b435efc4
commit
103daa356b
1 changed files with 11 additions and 0 deletions
|
@ -7,6 +7,17 @@ class MetadataPermalink < MetadataString
|
||||||
false
|
false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Devuelve la URL actual del sitio
|
||||||
|
#
|
||||||
|
# @return [String, nil]
|
||||||
|
def default_value
|
||||||
|
if post.written?
|
||||||
|
super.presence || document.url
|
||||||
|
else
|
||||||
|
super.presence
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
# Al hacer limpieza, validamos la ruta. Eliminamos / multiplicadas,
|
# Al hacer limpieza, validamos la ruta. Eliminamos / multiplicadas,
|
||||||
|
|
Loading…
Reference in a new issue