Read about our upcoming Code of Conduct on this issue

This instance was upgraded to Heptapod 0.28.0 today

Commit c7d717cf authored by Connor Shea's avatar Connor Shea
Browse files

Fix two problematic bits of code that will be deprecated or broken in Rails 5.

parent 4d149a6d9b93
...@@ -58,7 +58,7 @@ def update_forks_visibility_level ...@@ -58,7 +58,7 @@ def update_forks_visibility_level
# 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'
......
...@@ -13,9 +13,11 @@ ...@@ -13,9 +13,11 @@
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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment