Sha256: 6d8f8c6267c65dc6ac325b96917063635465fcb1657a066cce19cf9a124e74fa

Contents?: true

Size: 1.24 KB

Versions: 34

Compression:

Stored size: 1.24 KB

Contents

Avo::Engine.routes.draw do
  root "home#index"

  get "resources", to: redirect("/avo")

  scope "resources", as: "resources" do
    # Attachments
    get "/:resource_name/:id/active_storage_attachments/:attachment_name/:signed_attachment_id", to: "attachments#show"
    delete "/:resource_name/:id/active_storage_attachments/:attachment_name/:signed_attachment_id", to: "attachments#destroy"

    # Actions
    get "/:resource_name(/:id)/actions/:action_id", to: "actions#show"
    post "/:resource_name(/:id)/actions/:action_id", to: "actions#handle"

    # Generate resource routes as below:
    # resources :posts
    instance_eval(&Avo::App.draw_routes)

    # Relations
    get "/:resource_name/:id/:related_name/new", to: "relations#new"
    get "/:resource_name/:id/:related_name/", to: "relations#index"
    get "/:resource_name/:id/:related_name/:related_id", to: "relations#show"
    post "/:resource_name/:id/:related_name", to: "relations#create"
    delete "/:resource_name/:id/:related_name/:related_id", to: "relations#destroy"
  end

  # get '/avo-api/search',                  to: 'search#index'
  # get '/avo-api/:resource_name/search',   to: 'search#resource'

  # Tools
  # get '/avo-tools/resource-overview', to: 'resource_overview#index'
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
avo-1.3.5 config/routes.rb
avo-1.3.4 config/routes.rb
avo-1.3.3 config/routes.rb
avo-1.3.2 config/routes.rb
avo-1.3.1 config/routes.rb
avo-1.3.0 config/routes.rb
avo-1.2.11.pre.4 config/routes.rb
avo-1.2.11.pre.3 config/routes.rb
avo-1.2.11.pre.2 config/routes.rb
avo-1.2.11.pre.1 config/routes.rb
avo-1.2.10 config/routes.rb
avo-1.2.9 config/routes.rb
avo-1.2.8 config/routes.rb
avo-1.2.7 config/routes.rb
avo-1.2.6 config/routes.rb
avo-1.2.6.pre.1 config/routes.rb
avo-1.2.5 config/routes.rb
avo-1.2.4 config/routes.rb
avo-1.2.3 config/routes.rb
avo-1.3.0.pre.1 config/routes.rb