5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2025-03-15 02:08:20 +00:00

Merge branch 'issue-15068' into production.panel.sutty.nl

This commit is contained in:
f 2024-05-24 13:44:33 -03:00
commit 1e855242c5
No known key found for this signature in database
2 changed files with 10 additions and 7 deletions

View file

@ -14,7 +14,7 @@ class MetadataGeo < MetadataTemplate
return true unless changed? return true unless changed?
return true if empty? return true if empty?
self[:value] = value.transform_values(&:to_f) self[:value] = value.transform_values(&:to_f).to_h
self[:value] = encrypt(value) if private? self[:value] = encrypt(value) if private?
true true

View file

@ -3,12 +3,15 @@
# El título es obligatorio para todos los Post, si el esquema no lo # El título es obligatorio para todos los Post, si el esquema no lo
# incluye, tenemos que poder generar un valor legible por humanes. # incluye, tenemos que poder generar un valor legible por humanes.
class MetadataTitle < MetadataString class MetadataTitle < MetadataString
def titleize?
false
end
# Obtener todos los valores de texto del artículo y generar un título # Obtener todos los valores de texto del artículo y generar un título
# en base a eso. # en base a eso.
# #
# @return [String] # @return [String]
def default_value def default_value
@default_value ||=
post.attributes.select do |attr| post.attributes.select do |attr|
post[attr].titleize? post[attr].titleize?
end.map do |attr| end.map do |attr|