fixes
This commit is contained in:
parent
a15b7e2a60
commit
47f828f386
2 changed files with 3 additions and 2 deletions
|
@ -13,7 +13,8 @@ class Usuarie < ApplicationRecord
|
|||
has_many :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
|
||||
email.split('@', 2).first
|
||||
|
|
|
@ -126,7 +126,7 @@ class PostTest < ActiveSupport::TestCase
|
|||
end
|
||||
|
||||
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
|
||||
@post.slug.value = 'test'
|
||||
@post.date.value = hoy
|
||||
|
|
Loading…
Reference in a new issue