Fixes per @Ducz0r's request

This commit is contained in:
Luka Murn 2018-04-12 14:38:22 +02:00
parent 9bf8b5d864
commit 09c60d2468
5 changed files with 3 additions and 12 deletions

View file

@ -1,3 +0,0 @@
#reset-tutorial-btn {
margin-top: 5px;
}

View file

@ -299,7 +299,7 @@ class ProjectsController < ApplicationController
def generate_intro_demo
return unless current_user.sign_in_count == 1
team = current_user.teams.where(created_by: current_user).first
seed_demo_data(current_user) if team && team.projects.blank?
seed_demo_data(current_user, team) if team && team.projects.blank?
end
def project_params

View file

@ -1,12 +1,8 @@
module FirstTimeDataGenerator
# Create data for demo for new users
def seed_demo_data(user)
def seed_demo_data(user, team)
@user = user
# First team that this user created
# should contain the "intro" project
team = user.teams.where(created_by: user).order(created_at: :asc).first
# If private private team does not exist,
# there was something wrong with user creation.
# Do nothing
@ -64,7 +60,7 @@ module FirstTimeDataGenerator
repository_rows_to_assign = []
# Generate random custom respository sample names and assign sample types
# and groups
repository_sample_name = (0...3).map { 65.+(rand(26)).chr }.join << '/'
(1..5).each do |index|
repository_row = RepositoryRow.create(

View file

@ -128,6 +128,5 @@ Rails.application.configure do
config.x.new_team_on_signup = true
else
config.x.new_team_on_signup = false
config.x.enable_tutorial = false
end
end

View file

@ -162,6 +162,5 @@ Rails.application.configure do
config.x.new_team_on_signup = true
else
config.x.new_team_on_signup = false
config.x.enable_tutorial = false
end
end