Sha256: 0c129d6fcd462bb529523587b441d5faa751bda43b8fb320c62e8070b808da0b

Contents?: true

Size: 1.05 KB

Versions: 39

Compression:

Stored size: 1.05 KB

Contents

# frozen_string_literal: true

resources :patients, only: [] do
  resources :events, only: [:new, :create, :index], controller: "events/events"
  constraints(format: /(pdf)/) do
    resources :events, only: :show, controller: "events/events"
  end

  resources :swabs,
            only: [:new, :create, :edit, :update],
            controller: "events/swabs",
            defaults: { slug: :swabs }

  resources :investigations,
            only: [:new, :create, :edit, :update],
            controller: "events/investigations",
            defaults: { slug: :investigations }

  # Here we could enable new event by any other slug
  # eg patient_new_specific_event(slug: "transplant_biopsies")
  # get "events/:slug/new",
  #     to: "events/events#new",
  #     as: :new_specific_event
  # or we could hardwire routes as we do for swabs.
end

namespace :events do
  resources :types, except: :show
  constraints(named_filter: /all/) do
    get(
      "list/:named_filter",
      to: "lists#show",
      as: :filtered_list,
      defaults: { named_filter: "all" }
    )
  end
end

Version data entries

39 entries across 39 versions & 1 rubygems

Version Path
renalware-core-2.0.166 config/routes/events.rb
renalware-core-2.0.165 config/routes/events.rb
renalware-core-2.0.164 config/routes/events.rb
renalware-core-2.0.163 config/routes/events.rb
renalware-core-2.0.162 config/routes/events.rb
renalware-core-2.0.161 config/routes/events.rb
renalware-core-2.0.160 config/routes/events.rb
renalware-core-2.0.159 config/routes/events.rb
renalware-core-2.0.158 config/routes/events.rb
renalware-core-2.0.157 config/routes/events.rb
renalware-core-2.0.156 config/routes/events.rb
renalware-core-2.0.155 config/routes/events.rb
renalware-core-2.0.153 config/routes/events.rb
renalware-core-2.0.152 config/routes/events.rb
renalware-core-2.0.151 config/routes/events.rb
renalware-core-2.0.149 config/routes/events.rb
renalware-core-2.0.148 config/routes/events.rb
renalware-core-2.0.147 config/routes/events.rb
renalware-core-2.0.146 config/routes/events.rb
renalware-core-2.0.145 config/routes/events.rb