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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
c7d717cf
Commit
c7d717cf
authored
Sep 05, 2016
by
Connor Shea
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix two problematic bits of code that will be deprecated or broken in Rails 5.
parent
ad599eb6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
7 deletions
+9
-7
app/models/project.rb
app/models/project.rb
+1
-1
config/initializers/mime_types.rb
config/initializers/mime_types.rb
+8
-6
No files found.
app/models/project.rb
View file @
c7d717cf
...
@@ -58,7 +58,7 @@ class Project < ActiveRecord::Base
...
@@ -58,7 +58,7 @@ class Project < ActiveRecord::Base
# Relations
# Relations
belongs_to
:creator
,
foreign_key:
'creator_id'
,
class_name:
'User'
belongs_to
:creator
,
foreign_key:
'creator_id'
,
class_name:
'User'
belongs_to
:group
,
->
{
where
(
type:
Group
)
},
foreign_key:
'namespace_id'
belongs_to
:group
,
->
{
where
(
type:
'Group'
)
},
foreign_key:
'namespace_id'
belongs_to
:namespace
belongs_to
:namespace
has_one
:last_event
,
->
{
order
'events.created_at DESC'
},
class_name:
'Event'
,
foreign_key:
'project_id'
has_one
:last_event
,
->
{
order
'events.created_at DESC'
},
class_name:
'Event'
,
foreign_key:
'project_id'
...
...
config/initializers/mime_types.rb
View file @
c7d717cf
...
@@ -13,9 +13,11 @@ Mime::Type.register "video/mp4", :mp4, [], [:m4v, :mov]
...
@@ -13,9 +13,11 @@ Mime::Type.register "video/mp4", :mp4, [], [:m4v, :mov]
Mime
::
Type
.
register
"video/webm"
,
:webm
Mime
::
Type
.
register
"video/webm"
,
:webm
Mime
::
Type
.
register
"video/ogg"
,
:ogv
Mime
::
Type
.
register
"video/ogg"
,
:ogv
middlewares
=
Gitlab
::
Application
.
config
.
middleware
lfs_mime_types
=
%w(
middlewares
.
swap
(
ActionDispatch
::
ParamsParser
,
ActionDispatch
::
ParamsParser
,
{
application/vnd.git-lfs+json
Mime
::
Type
.
lookup
(
'application/vnd.git-lfs+json'
)
=>
lambda
do
|
body
|
text/x-json
ActiveSupport
::
JSON
.
decode
(
body
)
application/json
end
)
})
Mime
::
Type
.
unregister
:json
Mime
::
Type
.
register
'application/json'
,
:json
,
lfs_mime_types
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