Sha256: fca0a2184c827cbe154744ab22c8a5ee02fd2843304380163269b406390e9188

Contents?: true

Size: 749 Bytes

Versions: 14

Compression:

Stored size: 749 Bytes

Contents

class TestingReportController < ApplicationController
  before_filter :authenticate_user!
  before_filter :find_project, only: [:show]


  def index
    @title = "Testing Report"

    @projects = followed_projects.select { |project| can?(:read, project.testing_notes.build) }
    @tickets = Ticket.for_projects @projects
  end


  def show
    @title = "Testing Report • #{@project.name}"
    authorize! :show, @project.testing_notes.build

    @projects = [@project]
    @tickets = @project.tickets
  end


private


  def find_project
    @project = Project.find_by_slug!(params[:slug])
  end


  def default_render
    @tickets = TestingReportTicketPresenter.new(@tickets).as_json
    render json: @tickts if request.xhr?
    super
  end


end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
houston-core-0.7.0.beta3 app/controllers/testing_report_controller.rb
houston-core-0.7.0.beta2 app/controllers/testing_report_controller.rb
houston-core-0.7.0.beta app/controllers/testing_report_controller.rb
houston-core-0.6.3 app/controllers/testing_report_controller.rb
houston-core-0.6.2 app/controllers/testing_report_controller.rb
houston-core-0.6.1 app/controllers/testing_report_controller.rb
houston-core-0.6.0 app/controllers/testing_report_controller.rb
houston-core-0.5.6 app/controllers/testing_report_controller.rb
houston-core-0.5.5 app/controllers/testing_report_controller.rb
houston-core-0.5.4 app/controllers/testing_report_controller.rb
houston-core-0.5.3 app/controllers/testing_report_controller.rb
houston-core-0.5.2 app/controllers/testing_report_controller.rb
houston-core-0.5.1 app/controllers/testing_report_controller.rb
houston-core-0.5.0 app/controllers/testing_report_controller.rb