Merge remote-tracking branch 'origin/bug_322'
This commit is contained in:
commit
378ff10cfe
|
@ -34,6 +34,11 @@ class User < ActiveRecord::Base
|
|||
:foreign_key => :assignee_id,
|
||||
:dependent => :destroy
|
||||
|
||||
validates :projects_limit,
|
||||
:presence => true,
|
||||
:numericality => {:greater_than_or_equal_to => 0}
|
||||
|
||||
|
||||
before_create :ensure_authentication_token
|
||||
alias_attribute :private_token, :authentication_token
|
||||
scope :not_in_project, lambda { |project| where("id not in (:ids)", :ids => project.users.map(&:id) ) }
|
||||
|
@ -82,5 +87,6 @@ end
|
|||
# linkedin :string(255) default(""), not null
|
||||
# twitter :string(255) default(""), not null
|
||||
# authentication_token :string(255)
|
||||
# dark_scheme :boolean default(FALSE), not null
|
||||
#
|
||||
|
||||
|
|
|
@ -18,3 +18,14 @@ class WebHook < ActiveRecord::Base
|
|||
# There was a problem calling this web hook, let's forget about it.
|
||||
end
|
||||
end
|
||||
# == Schema Information
|
||||
#
|
||||
# Table name: web_hooks
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# url :string(255)
|
||||
# project_id :integer
|
||||
# created_at :datetime
|
||||
# updated_at :datetime
|
||||
#
|
||||
|
||||
|
|
12
db/schema.rb
12
db/schema.rb
|
@ -13,18 +13,6 @@
|
|||
|
||||
ActiveRecord::Schema.define(:version => 20111220190817) do
|
||||
|
||||
create_table "features", :force => true do |t|
|
||||
t.string "name"
|
||||
t.string "branch_name"
|
||||
t.integer "assignee_id"
|
||||
t.integer "author_id"
|
||||
t.integer "project_id"
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.string "version"
|
||||
t.integer "status", :default => 0, :null => false
|
||||
end
|
||||
|
||||
create_table "issues", :force => true do |t|
|
||||
t.string "title"
|
||||
t.integer "assignee_id"
|
||||
|
|
|
@ -65,5 +65,6 @@ end
|
|||
# linkedin :string(255) default(""), not null
|
||||
# twitter :string(255) default(""), not null
|
||||
# authentication_token :string(255)
|
||||
# dark_scheme :boolean default(FALSE), not null
|
||||
#
|
||||
|
||||
|
|
|
@ -52,3 +52,14 @@ describe WebHook do
|
|||
end
|
||||
end
|
||||
end
|
||||
# == Schema Information
|
||||
#
|
||||
# Table name: web_hooks
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# url :string(255)
|
||||
# project_id :integer
|
||||
# created_at :datetime
|
||||
# updated_at :datetime
|
||||
#
|
||||
|
||||
|
|
Loading…
Reference in a new issue