code climate fixes
This commit is contained in:
parent
4e93b4fce6
commit
79634f8faf
5 changed files with 33 additions and 17 deletions
|
@ -20,6 +20,8 @@ engines:
|
|||
enabled: true
|
||||
rubocop:
|
||||
enabled: true
|
||||
exclude_fingerprints:
|
||||
- 74f18007b920e8d81148d2f6a2756534
|
||||
ratings:
|
||||
paths:
|
||||
- 'Gemfile.lock'
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -111,7 +111,7 @@ class User < ApplicationRecord
|
|||
self[:settings] = val
|
||||
end
|
||||
|
||||
def mailboxer_email(object)
|
||||
def mailboxer_email(_object)
|
||||
nil # email
|
||||
end
|
||||
|
||||
|
|
|
@ -1,21 +1,21 @@
|
|||
# frozen_string_literal: true
|
||||
Mailboxer.setup do |config|
|
||||
|
||||
#Configures if your application uses or not email sending for Notifications and Messages
|
||||
# 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"
|
||||
# Configures the default from for emails sent for Messages and Notifications
|
||||
config.default_from = 'no-reply@metamaps.cc'
|
||||
|
||||
#Configures the methods needed by mailboxer
|
||||
# Configures the methods needed by mailboxer
|
||||
config.email_method = :mailboxer_email
|
||||
config.name_method = :name
|
||||
|
||||
#Configures if you use or not a search engine and which one you are using
|
||||
#Supported engines: [:solr,:sphinx]
|
||||
# Configures if you use or not a search engine and which one you are using
|
||||
# Supported engines: [:solr,:sphinx]
|
||||
config.search_enabled = false
|
||||
config.search_engine = :solr
|
||||
|
||||
#Configures maximum length of the message subject and body
|
||||
# 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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue