code climate fixes

This commit is contained in:
Devin Howard 2016-11-25 11:57:20 -05:00
parent 4e93b4fce6
commit 79634f8faf
5 changed files with 33 additions and 17 deletions

View file

@ -20,6 +20,8 @@ engines:
enabled: true
rubocop:
enabled: true
exclude_fingerprints:
- 74f18007b920e8d81148d2f6a2756534
ratings:
paths:
- 'Gemfile.lock'

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
class NotificationsController < ApplicationController
before_action :set_receipts, only: [:index, :show, :mark_read, :mark_unread]
before_action :set_notification, only: [:show, :mark_read, :mark_unread]
@ -66,5 +67,4 @@ class NotificationsController < ApplicationController
def set_receipt
@receipt = @receipts.find_by(notification_id: params[:id])
end
end

View file

@ -111,7 +111,7 @@ class User < ApplicationRecord
self[:settings] = val
end
def mailboxer_email(object)
def mailboxer_email(_object)
nil # email
end

View file

@ -1,10 +1,10 @@
# frozen_string_literal: true
Mailboxer.setup do |config|
# Configures if your application uses or not email sending for Notifications and Messages
config.uses_emails = true
# Configures the default from for emails sent for Messages and Notifications
config.default_from = "no-reply@metamaps.cc"
config.default_from = 'no-reply@metamaps.cc'
# Configures the methods needed by mailboxer
config.email_method = :mailboxer_email
@ -17,5 +17,5 @@ Mailboxer.setup do |config|
# Configures maximum length of the message subject and body
config.subject_max_length = 255
config.body_max_length = 32000
config.body_max_length = 32_000
end

View file

@ -20,12 +20,25 @@ Metamaps::Application.routes.draw do
post 'events/:event', action: :events
get :contains
get :request_access, to: 'access#request_access'
get 'approve_access/:request_id', to: 'access#approve_access', as: :approve_access
get 'deny_access/:request_id', to: 'access#deny_access', as: :deny_access
post :access_request, to: 'access#access_request', default: { format: :json }
post 'approve_access/:request_id', to: 'access#approve_access_post', default: { format: :json }
post 'deny_access/:request_id', to: 'access#deny_access_post', default: { format: :json }
get :request_access,
to: 'access#request_access'
get 'approve_access/:request_id',
to: 'access#approve_access',
as: :approve_access
get 'deny_access/:request_id',
to: 'access#deny_access',
as: :deny_access
post :access_request,
to: 'access#access_request',
default: { format: :json }
post 'approve_access/:request_id',
to: 'access#approve_access_post',
default: { format: :json }
post 'deny_access/:request_id',
to: 'access#deny_access_post',
default: { format: :json }
post :access, to: 'access#access', default: { format: :json }
post :star, to: 'stars#create', default: { format: :json }
@ -115,3 +128,4 @@ Metamaps::Application.routes.draw do
get 'load_url_title'
end
end
# rubocop:enable Rubocop/Metrics/BlockLength