Set custom fields before saving in fabricator.

This commit is contained in:
Guo Xiang Tan 2017-05-12 14:01:31 +08:00
parent 41711e53b7
commit b479aa0598
1 changed files with 1 additions and 1 deletions

View File

@ -95,7 +95,7 @@ Fabricator(:anonymous, from: :user) do
trust_level TrustLevel[1]
trust_level_locked true
after_create do |user|
before_create do |user|
user.custom_fields["master_id"] = 1
user.save!
end