-
Notifications
You must be signed in to change notification settings - Fork 500
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
0 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,3 @@ | ||
# 初始化用户 | ||
super_user = User.find_by(name: 'admin001', email: '[email protected]') | ||
unless super_user | ||
User.create(login_identity: SecureRandom.uuid, | ||
name: 'admin001', | ||
password: 'admin001', | ||
roles: 'super_user', | ||
email: '[email protected]') | ||
end | ||
|
||
# 初始化默认的四个 Space Tag | ||
Tag::DEFAULT_TAGS.each do |htag| | ||
tag = Tag.find_by(name: htag[:name]) | ||
next if tag | ||
puts "creating tag: #{htag[:name]}" | ||
Tag.create(name: htag[:name], color: htag[:color]) | ||
end | ||
|
||
# 初始化 System Config | ||
if SystemConfig.first.blank? | ||
if Rails.env.development? | ||
|