diff --git a/app/models/note.rb b/app/models/note.rb index 906de4855ab..d666d5d52c8 100644 --- a/app/models/note.rb +++ b/app/models/note.rb @@ -23,6 +23,8 @@ require 'file_size_validator' class Note < ActiveRecord::Base include Mentionable + default_value_for :system, false + attr_accessible :note, :noteable, :noteable_id, :noteable_type, :project_id, :attachment, :line_code, :commit_id attr_mentionable :note diff --git a/app/models/project.rb b/app/models/project.rb index 386ab542a68..09642ffa22f 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -29,6 +29,12 @@ class Project < ActiveRecord::Base extend Enumerize default_value_for :archived, false + default_value_for :issues_enabled, true + default_value_for :wall_enabled, false + default_value_for :merge_requests_enabled, true + default_value_for :wiki_enabled, true + default_value_for :snippets_enabled, false + default_value_for :imported, false ActsAsTaggableOn.strict_case_match = true diff --git a/app/models/user.rb b/app/models/user.rb index 58d90f03b34..c25dcb074a1 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -49,6 +49,11 @@ require 'carrierwave/orm/activerecord' require 'file_size_validator' class User < ActiveRecord::Base + default_value_for :admin, false + default_value_for :can_create_group, true + default_value_for :can_create_team, false + default_value_for :hide_no_ssh_key, false + devise :database_authenticatable, :token_authenticatable, :lockable, :async, :recoverable, :rememberable, :trackable, :validatable, :omniauthable, :confirmable, :registerable