mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-16 10:01:41 +00:00
rubocop
This commit is contained in:
parent
f9e0ad698b
commit
02d72f4227
1 changed files with 3 additions and 3 deletions
|
@ -29,7 +29,7 @@ class Post
|
|||
# TODO: Reemplazar cuando leamos el contenido del Document
|
||||
# a demanda?
|
||||
def find_layout(path)
|
||||
IO.foreach(path).lazy.grep(/^layout: /).take(1).first&.split(' ')&.last&.tr('\'', '')&.tr('"', '')&.to_sym
|
||||
File.foreach(path).lazy.grep(/^layout: /).take(1).first&.split(' ')&.last&.tr('\'', '')&.tr('"', '')&.to_sym
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -114,7 +114,7 @@ class Post
|
|||
|
||||
# Devuelve una llave para poder guardar el post en una cache
|
||||
def cache_key
|
||||
'posts/' + uuid.value
|
||||
"posts/#{uuid.value}"
|
||||
end
|
||||
|
||||
def cache_version
|
||||
|
@ -124,7 +124,7 @@ class Post
|
|||
# Agregar el timestamp para saber si cambió, siguiendo el módulo
|
||||
# ActiveRecord::Integration
|
||||
def cache_key_with_version
|
||||
cache_key + '-' + cache_version
|
||||
"#{cache_key}-#{cache_version}"
|
||||
end
|
||||
|
||||
# TODO: Convertir a UUID?
|
||||
|
|
Loading…
Reference in a new issue