Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions app/controllers/admin/frameworks_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ def publish

def archive_confirmation; end

# rubocop:disable Metrics/AbcSize
def archive
@framework.errors.clear

Expand All @@ -89,15 +88,14 @@ def archive
return redirect_to admin_framework_path(@framework)
end

if @framework.archive
if @framework.archive!
flash[:success] = 'Framework archived successfully.'
else
flash[:failure] = @framework.errors.full_messages.to_sentence.presence || 'Error archiving framework.'
flash[:failure] = 'Error archiving framework: FDL does not pass validation.'
end

redirect_to admin_framework_path(@framework)
end
# rubocop:enable Metrics/AbcSize

def unarchive_confirmation; end

Expand Down