Sha256: 23e5bb57b8642b670a085933a57572eeb87f64ecfb10947ef7e4d093240344b1

Contents?: true

Size: 1.24 KB

Versions: 18

Compression:

Stored size: 1.24 KB

Contents

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

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

  scope "avo_api", as: "avo_api" do
    get "/search", to: "search#index"
    get "/:resource_name/search", to: "search#show"
    post "/resources/:resource_name/:id/attachments/", to: "attachments#create"
  end

  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
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
avo-1.17.1 config/routes.rb
avo-1.17.0 config/routes.rb
avo-1.16.4 config/routes.rb
avo-1.16.3 config/routes.rb
avo-1.16.2 config/routes.rb
avo-1.16.1 config/routes.rb
avo-1.16.0 config/routes.rb
avo-1.15.0 config/routes.rb
avo-1.15.0.pre.1 config/routes.rb
avo-1.14.0 config/routes.rb
avo-1.13.3 config/routes.rb
avo-1.13.2 config/routes.rb
avo-1.13.1 config/routes.rb
avo-1.13.0 config/routes.rb
avo-1.12.4 config/routes.rb
avo-1.12.3 config/routes.rb
avo-1.12.2 config/routes.rb
avo-1.12.1 config/routes.rb