forgeplus/app/controllers/blob_controller.rb

13 lines
335 B
Ruby
Raw Normal View History

2020-03-09 00:40:16 +08:00
class BlobController < ApplicationController
def new
commit unless @repository.empty?
end
def create
create_commit(Files::CreateService, success_path: after_create_path,
failure_view: :new,
failure_path: namespace_project_new_blob_path(@project.namespace, @project, @ref))
end
end