Skip to content

Commit

Permalink
add previewable concern to qa/issues
Browse files Browse the repository at this point in the history
  • Loading branch information
caitmich committed Aug 23, 2023
1 parent aec4287 commit 85c7866
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion app/controllers/qa/issues_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ class QA::IssuesController < AuthenticatedController
include ActivityTracking
include LiquidEnabledResource
include Mentioned
include Previewable
include ProjectScoped

before_action :set_issues
before_action :set_issue, only: [:edit, :show, :update]
before_action :set_issue, only: [:edit, :show, :update, :preview]
before_action :store_location, only: [:index, :show]
before_action :validate_state, only: [:multiple_update, :update]

Expand All @@ -17,6 +18,7 @@ def show; end

def edit
@form_cancel_path = project_qa_issue_path(current_project, @issue)
@form_preview_path = { preview_url: preview_project_qa_issue_path }
@tags = current_project.tags
end

Expand Down
2 changes: 1 addition & 1 deletion config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
resources :tags, except: [:show]

namespace :qa do
resources :issues, only: [:edit, :index, :show, :update], concerns: :multiple_update
resources :issues, only: [:edit, :index, :show, :update], concerns: [:multiple_update, :previewable]
end

get 'search' => 'search#index'
Expand Down

0 comments on commit 85c7866

Please sign in to comment.