diff --git a/app/models/site.rb b/app/models/site.rb index ec299cd..6c93083 100644 --- a/app/models/site.rb +++ b/app/models/site.rb @@ -197,8 +197,7 @@ class Site < ApplicationRecord # Define los valores por defecto segĂșn la llave buscada @jekyll.data.default_proc = proc do |data, key| data[key] = case key - when 'layout' then {} - else nil + when 'layout' then {} end end diff --git a/config/routes.rb b/config/routes.rb index b65fc2c..f5a25fd 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -17,7 +17,7 @@ Rails.application.routes.draw do get :'sites/hidden_services', to: 'sites#hidden_services' post :'sites/add_onion', to: 'sites#add_onion' - resources :sites, only: %i[index], constraints: { site_id: /[a-z0-9\-\.]+/, id: /[a-z0-9\-\.]+/ } do + resources :sites, only: %i[index], constraints: { site_id: /[a-z0-9\-.]+/, id: /[a-z0-9\-.]+/ } do get :'invitades/cookie', to: 'invitades#cookie' post :'posts/:layout', to: 'posts#create', as: :posts