Showing 210 of 210 total issues
Similar blocks of code found in 2 locations. Consider refactoring. Open
respond_to do |format| if @label.save format.json { render partial: 'labels', locals: {project: @project} } else format.json { render text: @label.errors.full_messages, status: 422 }
- Read upRead up
Similar blocks of code found in 2 locations. Consider refactoring. Open
def remline(line) set_line_number "<tr class='changes'> #{td_line_link "#{@diff_prefix}-F#{@diff_counter}L#{line.old_number}", line.old_number} <td class='line_numbers'></td>
- Read upRead up
Similar blocks of code found in 2 locations. Consider refactoring. Open
respond_to do |format| if @label.destroy format.json { render partial: 'labels', locals: {project: @project} } else format.json { render json: @label.errors.full_messages, status: 422 }
- Read upRead up
Similar blocks of code found in 2 locations. Consider refactoring. Open
def addline(line) set_line_number "<tr class='changes'> <td class='line_numbers'></td> #{td_line_link "#{@diff_prefix}-F#{@diff_counter}R#{line.new_number}", line.new_number}
- Read upRead up
Similar blocks of code found in 2 locations. Consider refactoring. Open
if request.patch? if @user.notifier.update_attributes(settings_notifier_params) flash[:notice] = I18n.t("flash.settings.saved") redirect_to notifiers_settings_path and return end
- Read upRead up
Similar blocks of code found in 2 locations. Consider refactoring. Open
if request.patch? if @user.builds_setting.update_attributes(user_builds_setting_params) flash[:notice] = I18n.t("flash.settings.saved") redirect_to builds_settings_settings_path and return end
- Read upRead up
Similar blocks of code found in 2 locations. Consider refactoring. Open
issues: { open: prepare_collection(issues_open), reopen: prepare_collection(issues_reopen), closed: prepare_collection(issues_closed),
- Read upRead up
Similar blocks of code found in 2 locations. Consider refactoring. Open
pull_requests: { open: prepare_collection(pull_requests_open), merged: prepare_collection(pull_requests_merged), closed: prepare_collection(pull_requests_closed),
- Read upRead up
Similar blocks of code found in 2 locations. Consider refactoring. Open
def fa_visibility_icon(project) return nil unless project image, color = project.public? ? ['unlock-alt', 'text-success fa-fw'] : ['lock', 'text-danger fa-fw'] fa_icon(image, class: color)
- Read upRead up
Similar blocks of code found in 2 locations. Consider refactoring. Open
def fa_platform_visibility_icon(platform) return nil unless platform image, color = platform.hidden? ? ['lock', 'text-danger fa-fw']: ['unlock-alt', 'text-success fa-fw'] fa_icon(image, class: color)
- Read upRead up