creates the update_file method in repository.rb and applies changes accordingly

This commit is contained in:
tiagonbotelho 2016-07-04 11:32:57 +01:00
parent 3824f6fde8
commit 840335ec83
2 changed files with 0 additions and 2 deletions

View file

@ -731,7 +731,6 @@ class Repository
end
end
# previous_path, message, update
def update_file(user, path, content, branch, options={})
commit_with_hooks(user, branch) do |ref|
committer = user_to_committer(user)

View file

@ -3,7 +3,6 @@ require_relative "base_service"
module Files
class UpdateService < Files::BaseService
def commit
repository.update_file(current_user, @file_path, @file_content,
@target_branch, previous_path: @previous_path,
message: @commit_message, update: true)