Sha256: 3fd515f0271ccf903ec6d84769cf44ea690641ca854ce41d488b1664e892ce01
Contents?: true
Size: 647 Bytes
Versions: 7
Compression:
Stored size: 647 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 = params[:tags] == 'true' ? true : [*params[:tags]].compact view_model = ViewDomain::IndexItems.new(index_service.find_index_items(tags: tags)) page = tags == true || tags.any? ? :'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
7 entries across 7 versions & 1 rubygems