This commit is contained in:
Devin Howard 2018-02-05 21:43:10 -08:00
parent 961b3f2444
commit f10af09164
5 changed files with 5 additions and 1 deletions

View file

@ -1,4 +1,5 @@
# frozen_string_literal: true
module Api
module V2
class AttachmentsController < RestfulController

View file

@ -1,4 +1,5 @@
# frozen_string_literal: true
class AttachmentsController < ApplicationController
before_action :set_attachment, only: [:destroy]
after_action :verify_authorized

View file

@ -1,4 +1,5 @@
# frozen_string_literal: true
class AttachmentPolicy < ApplicationPolicy
class Scope < Scope
def resolve

View file

@ -1,4 +1,5 @@
# frozen_string_literal: true
module Api
module V2
class AttachmentSerializer < ApplicationSerializer

View file

@ -7,7 +7,7 @@ Metamaps::Application.routes.draw do
root to: 'main#home', via: :get
get 'request', to: 'main#requestinvite', as: :request
resources :attachments, only: [:create, :destroy], shallow: true
resources :attachments, only: %i[create destroy], shallow: true
namespace :explore do
get 'active'