Merge pull request #37 from Chevich123/master

Add extra_info to safe_attributes. fix #34
This commit is contained in:
Muhammad Inam 2018-03-07 19:06:44 +05:30 committed by GitHub
commit e25577c5ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -11,6 +11,8 @@ class Repository::GitRemote < Repository::Git
before_validation :initialize_clone
safe_attributes 'extra_info', :if => lambda {|repository, _user| repository.new_record?}
# TODO: figure out how to do this safely (if at all)
# before_deletion :rm_removed_repo
# def rm_removed_repo

View File

@ -12,7 +12,7 @@ module RedmineGitRemote
:label => l(:field_path_to_repository)) +
content_tag('em', l(:text_git_remote_path_note), :class => 'info') +
form.text_field(:extra_clone_url, :size => 60, :required => true,
:disabled => !repository.safe_attribute?('url')) +
:disabled => !repository.safe_attribute?('url'), name: 'repository[extra_info][extra_clone_url]') +
content_tag('em', l(:text_git_remote_url_note), :class => 'info')
)
end