Sha256: 759f68270d99d0b5a94a6d470eb9caf53b1e60ef188b2e0002e6db891993dd5b
Contents?: true
Size: 1.26 KB
Versions: 34
Compression:
Stored size: 1.26 KB
Contents
require "pact_broker/ui/controllers/base_controller" require "pact_broker/ui/view_models/index_items" require "haml" # TODO handle 404 gracefully module PactBroker module UI module Controllers class Groups < Base include PactBroker::Services get ":name" do erb :'groups/show.html', { locals: locals(tab: "details") }, { layout: "layouts/main", } end get ":name/network" do erb :'groups/show.html', { locals: locals(tab: "network") }, { layout: "layouts/main", } end def locals(overrides) pacticipant = pacticipant_service.find_pacticipant_by_name(params[:name]) { csv_path: "#{base_url}/groups/#{ERB::Util.url_encode(params[:name])}.csv", pacticipant_name: params[:name], repository_url: pacticipant&.repository_url, base_url: base_url, pacticipant: pacticipant, details_url: "#{base_url}/pacticipants/#{ERB::Util.url_encode(params[:name])}", network_url: "#{base_url}/pacticipants/#{ERB::Util.url_encode(params[:name])}/network" }.merge(overrides) end end end end end
Version data entries
34 entries across 34 versions & 1 rubygems