Sha256: f73fd6b245469cdaa42f6d1419624cfd6e4f0d95d5630f92f6094a0351a96f80

Contents?: true

Size: 690 Bytes

Versions: 28

Compression:

Stored size: 690 Bytes

Contents

require 'pact_broker/ui/controllers/base_controller'
require 'pact_broker/ui/view_models/index_items'
require 'haml'

module PactBroker
  module UI
    module Controllers
      class Index < Base

        include PactBroker::Services

        get "/" do
          tags = nil
          if params[:tags]
            tags = params[:tags] == 'true' ? true : [*params[:tags]].compact
          end
          view_model = ViewDomain::IndexItems.new(index_service.find_index_items(tags: tags))
          page = tags ? :'index/show-with-tags' : :'index/show'
          haml page, {locals: {index_items: view_model, title: "Pacts"}, layout: :'layouts/main'}
        end

      end
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
pact_broker-2.30.0 lib/pact_broker/ui/controllers/index.rb
pact_broker-2.29.0 lib/pact_broker/ui/controllers/index.rb
pact_broker-2.27.6 lib/pact_broker/ui/controllers/index.rb
pact_broker-2.27.5 lib/pact_broker/ui/controllers/index.rb
pact_broker-2.27.4 lib/pact_broker/ui/controllers/index.rb
pact_broker-2.27.3 lib/pact_broker/ui/controllers/index.rb
pact_broker-2.27.2 lib/pact_broker/ui/controllers/index.rb
pact_broker-2.27.0 lib/pact_broker/ui/controllers/index.rb
pact_broker-2.26.1 lib/pact_broker/ui/controllers/index.rb
pact_broker-2.26.0 lib/pact_broker/ui/controllers/index.rb
pact_broker-2.25.0 lib/pact_broker/ui/controllers/index.rb
pact_broker-2.24.0 lib/pact_broker/ui/controllers/index.rb
pact_broker-2.23.4 lib/pact_broker/ui/controllers/index.rb
pact_broker-2.23.3 lib/pact_broker/ui/controllers/index.rb
pact_broker-2.23.2 lib/pact_broker/ui/controllers/index.rb
pact_broker-2.23.1 lib/pact_broker/ui/controllers/index.rb
pact_broker-2.23.0 lib/pact_broker/ui/controllers/index.rb
pact_broker-2.22.0 lib/pact_broker/ui/controllers/index.rb
pact_broker-2.21.0 lib/pact_broker/ui/controllers/index.rb
pact_broker-2.20.0 lib/pact_broker/ui/controllers/index.rb