From f10af091641b0b59100a690db06e45dd8727937e Mon Sep 17 00:00:00 2001 From: Devin Howard Date: Mon, 5 Feb 2018 21:43:10 -0800 Subject: [PATCH] rubocop --- app/controllers/api/v2/attachments_controller.rb | 1 + app/controllers/attachments_controller.rb | 1 + app/policies/attachment_policy.rb | 1 + app/serializers/api/v2/attachment_serializer.rb | 1 + config/routes.rb | 2 +- 5 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/controllers/api/v2/attachments_controller.rb b/app/controllers/api/v2/attachments_controller.rb index b88bba1b..aa2f79be 100644 --- a/app/controllers/api/v2/attachments_controller.rb +++ b/app/controllers/api/v2/attachments_controller.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Api module V2 class AttachmentsController < RestfulController diff --git a/app/controllers/attachments_controller.rb b/app/controllers/attachments_controller.rb index 070431de..b5e3723c 100644 --- a/app/controllers/attachments_controller.rb +++ b/app/controllers/attachments_controller.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + class AttachmentsController < ApplicationController before_action :set_attachment, only: [:destroy] after_action :verify_authorized diff --git a/app/policies/attachment_policy.rb b/app/policies/attachment_policy.rb index 2e21bfb0..b7b799fa 100644 --- a/app/policies/attachment_policy.rb +++ b/app/policies/attachment_policy.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + class AttachmentPolicy < ApplicationPolicy class Scope < Scope def resolve diff --git a/app/serializers/api/v2/attachment_serializer.rb b/app/serializers/api/v2/attachment_serializer.rb index f227f152..e05e40bf 100644 --- a/app/serializers/api/v2/attachment_serializer.rb +++ b/app/serializers/api/v2/attachment_serializer.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Api module V2 class AttachmentSerializer < ApplicationSerializer diff --git a/config/routes.rb b/config/routes.rb index 1ef8643a..d84db842 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -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'