This commit is contained in:
f 2019-09-12 17:07:29 -03:00
parent a15b7e2a60
commit 47f828f386
No known key found for this signature in database
GPG key ID: 2AE5A13E321F953D
2 changed files with 3 additions and 2 deletions

View file

@ -13,7 +13,8 @@ class Usuarie < ApplicationRecord
has_many :roles has_many :roles
has_many :sites, through: :roles has_many :sites, through: :roles
after_create :register_in_lounge!, if: Rails.env.production? before_create :register_in_lounge!,
if: proc { Rails.env.production? }
def name def name
email.split('@', 2).first email.split('@', 2).first

View file

@ -126,7 +126,7 @@ class PostTest < ActiveSupport::TestCase
end end
test 'al cambiar slug o fecha cambia el archivo de ubicacion' do test 'al cambiar slug o fecha cambia el archivo de ubicacion' do
hoy = 2.days.ago.to_time hoy = 2.days.from_now.to_time
path_was = @post.path.absolute path_was = @post.path.absolute
@post.slug.value = 'test' @post.slug.value = 'test'
@post.date.value = hoy @post.date.value = hoy