Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
iv
gitlab-ce
Commits
378ff10c
Commit
378ff10c
authored
Jan 05, 2012
by
VSizov
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/bug_322'
parents
05993f90
212f400d
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
12 deletions
+29
-12
app/models/user.rb
app/models/user.rb
+6
-0
app/models/web_hook.rb
app/models/web_hook.rb
+11
-0
db/schema.rb
db/schema.rb
+0
-12
spec/models/user_spec.rb
spec/models/user_spec.rb
+1
-0
spec/models/web_hook_spec.rb
spec/models/web_hook_spec.rb
+11
-0
No files found.
app/models/user.rb
View file @
378ff10c
...
@@ -34,6 +34,11 @@ class User < ActiveRecord::Base
...
@@ -34,6 +34,11 @@ class User < ActiveRecord::Base
:foreign_key
=>
:assignee_id
,
:foreign_key
=>
:assignee_id
,
:dependent
=>
:destroy
:dependent
=>
:destroy
validates
:projects_limit
,
:presence
=>
true
,
:numericality
=>
{
:greater_than_or_equal_to
=>
0
}
before_create
:ensure_authentication_token
before_create
:ensure_authentication_token
alias_attribute
:private_token
,
:authentication_token
alias_attribute
:private_token
,
:authentication_token
scope
:not_in_project
,
lambda
{
|
project
|
where
(
"id not in (:ids)"
,
:ids
=>
project
.
users
.
map
(
&
:id
)
)
}
scope
:not_in_project
,
lambda
{
|
project
|
where
(
"id not in (:ids)"
,
:ids
=>
project
.
users
.
map
(
&
:id
)
)
}
...
@@ -82,5 +87,6 @@ end
...
@@ -82,5 +87,6 @@ end
# linkedin :string(255) default(""), not null
# linkedin :string(255) default(""), not null
# twitter :string(255) default(""), not null
# twitter :string(255) default(""), not null
# authentication_token :string(255)
# authentication_token :string(255)
# dark_scheme :boolean default(FALSE), not null
#
#
app/models/web_hook.rb
View file @
378ff10c
...
@@ -18,3 +18,14 @@ class WebHook < ActiveRecord::Base
...
@@ -18,3 +18,14 @@ class WebHook < ActiveRecord::Base
# There was a problem calling this web hook, let's forget about it.
# There was a problem calling this web hook, let's forget about it.
end
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
#
db/schema.rb
View file @
378ff10c
...
@@ -13,18 +13,6 @@
...
@@ -13,18 +13,6 @@
ActiveRecord
::
Schema
.
define
(
:version
=>
20111220190817
)
do
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
|
create_table
"issues"
,
:force
=>
true
do
|
t
|
t
.
string
"title"
t
.
string
"title"
t
.
integer
"assignee_id"
t
.
integer
"assignee_id"
...
...
spec/models/user_spec.rb
View file @
378ff10c
...
@@ -65,5 +65,6 @@ end
...
@@ -65,5 +65,6 @@ end
# linkedin :string(255) default(""), not null
# linkedin :string(255) default(""), not null
# twitter :string(255) default(""), not null
# twitter :string(255) default(""), not null
# authentication_token :string(255)
# authentication_token :string(255)
# dark_scheme :boolean default(FALSE), not null
#
#
spec/models/web_hook_spec.rb
View file @
378ff10c
...
@@ -52,3 +52,14 @@ describe WebHook do
...
@@ -52,3 +52,14 @@ describe WebHook do
end
end
end
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
#
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment