mirror of
https://github.com/astuto/astuto.git
synced 2025-12-15 03:07:52 +01:00
Add Site settings > General (#133)
This commit is contained in:
committed by
GitHub
parent
bdc4004e4a
commit
35831b9801
43
db/seeds.rb
43
db/seeds.rb
@@ -1,3 +1,11 @@
|
||||
# Create tenant
|
||||
tenant = Tenant.create(
|
||||
site_name: 'Default site name',
|
||||
subdomain: 'default',
|
||||
status: 'active'
|
||||
)
|
||||
Current.tenant = tenant
|
||||
|
||||
# Create an admin user and confirm its email automatically
|
||||
admin = User.create(
|
||||
full_name: 'Admin',
|
||||
@@ -10,7 +18,7 @@ admin = User.create(
|
||||
# Create some boards
|
||||
feature_board = Board.create(
|
||||
name: 'Feature Requests',
|
||||
description: 'This is a **board**! You can create as many as you want from **site settings** and they can be *Markdown formatted*.',
|
||||
description: 'This is a **board**! You can create as many as you want from **site settings** and their description can be *Markdown formatted*.',
|
||||
order: 0
|
||||
)
|
||||
bug_board = Board.create(
|
||||
@@ -47,30 +55,33 @@ rejected_post_status = PostStatus.create(
|
||||
|
||||
# Create some posts
|
||||
post1 = Post.create(
|
||||
title: 'This is how users give you feedback',
|
||||
description: 'They can also provide an extendend description like this... bla bla...',
|
||||
board_id: feature_board.id,
|
||||
user_id: admin.id
|
||||
)
|
||||
post2 = Post.create(
|
||||
title: 'You can assign a status to each post',
|
||||
description: 'This one, for example, is marked as "Planned"',
|
||||
title: 'Users can submit feedback by publishing posts!',
|
||||
description: 'You can assign a **status** to each post: this one, for example, is marked as "Planned". Remember that you can customise post statuses from Site settings > Statuses',
|
||||
board_id: feature_board.id,
|
||||
user_id: admin.id,
|
||||
post_status_id: planned_post_status.id
|
||||
)
|
||||
post3 = Post.create(
|
||||
title: 'There are multiple boards',
|
||||
description: 'For now you have Feature Requests and Bug Reports, but you can add or remove as many as you want!',
|
||||
board_id: bug_board.id,
|
||||
PostStatusChange.create(
|
||||
post_id: post1.id,
|
||||
user_id: admin.id,
|
||||
post_status_id: in_progress_post_status.id
|
||||
post_status_id: planned_post_status.id
|
||||
)
|
||||
|
||||
# Create some comments
|
||||
post1.comments.create(body: 'Users can comment to express their opinions!', user_id: admin.id)
|
||||
post2 = Post.create(
|
||||
title: 'There are multiple boards',
|
||||
description: 'For now you have Feature Requests and Bug Reports, but you can add or remove as many as you want! Just go to Site settings > Boards!',
|
||||
board_id: bug_board.id,
|
||||
user_id: admin.id
|
||||
)
|
||||
|
||||
# # Create some comments
|
||||
post1.comments.create(
|
||||
body: 'Users can comment to express their opinions! As with posts and board descriptions, comments can be *Markdown* **formatted**',
|
||||
user_id: admin.id
|
||||
)
|
||||
|
||||
# Let the user know how to log in with admin account
|
||||
puts "A default tenant has been created with name #{tenant.site_name}"
|
||||
puts 'A default admin account has been created. Credentials:'
|
||||
puts "-> email: #{admin.email}"
|
||||
puts "-> password: #{admin.password}"
|
||||
Reference in New Issue
Block a user