chatwoot-develop/scripts/seed_unit.rb
2026-01-12 19:04:15 -03:00

10 lines
269 B
Ruby

account = Account.first
if account
unit = Captain::Unit.find_or_create_by!(name: 'Unidade Matriz', account: account) do |u|
u.status = :active
end
puts "Unit ensure: #{unit.name} (ID: #{unit.id}) for Account #{account.id}"
else
puts 'No account found!'
end