From 9e35867ed5506754178a586f33fe8584621e208e Mon Sep 17 00:00:00 2001 From: f Date: Mon, 7 Dec 2020 13:22:29 -0300 Subject: [PATCH] ruboyuta --- app/models/site.rb | 3 +-- config/routes.rb | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/app/models/site.rb b/app/models/site.rb index ec299cd8..6c930836 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 b65fc2ce..f5a25fdf 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