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
|
enabled: true
|
||||||
rubocop:
|
rubocop:
|
||||||
enabled: true
|
enabled: true
|
||||||
|
exclude_fingerprints:
|
||||||
|
- 74f18007b920e8d81148d2f6a2756534
|
||||||
ratings:
|
ratings:
|
||||||
paths:
|
paths:
|
||||||
- 'Gemfile.lock'
|
- 'Gemfile.lock'
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
class NotificationsController < ApplicationController
|
class NotificationsController < ApplicationController
|
||||||
before_action :set_receipts, only: [:index, :show, :mark_read, :mark_unread]
|
before_action :set_receipts, only: [:index, :show, :mark_read, :mark_unread]
|
||||||
before_action :set_notification, only: [: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
|
def set_receipt
|
||||||
@receipt = @receipts.find_by(notification_id: params[:id])
|
@receipt = @receipts.find_by(notification_id: params[:id])
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -111,7 +111,7 @@ class User < ApplicationRecord
|
||||||
self[:settings] = val
|
self[:settings] = val
|
||||||
end
|
end
|
||||||
|
|
||||||
def mailboxer_email(object)
|
def mailboxer_email(_object)
|
||||||
nil # email
|
nil # email
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -1,21 +1,21 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
Mailboxer.setup do |config|
|
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
|
config.uses_emails = true
|
||||||
|
|
||||||
#Configures the default from for emails sent for Messages and Notifications
|
# 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
|
# Configures the methods needed by mailboxer
|
||||||
config.email_method = :mailboxer_email
|
config.email_method = :mailboxer_email
|
||||||
config.name_method = :name
|
config.name_method = :name
|
||||||
|
|
||||||
#Configures if you use or not a search engine and which one you are using
|
# Configures if you use or not a search engine and which one you are using
|
||||||
#Supported engines: [:solr,:sphinx]
|
# Supported engines: [:solr,:sphinx]
|
||||||
config.search_enabled = false
|
config.search_enabled = false
|
||||||
config.search_engine = :solr
|
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.subject_max_length = 255
|
||||||
config.body_max_length = 32000
|
config.body_max_length = 32_000
|
||||||
end
|
end
|
||||||
|
|
|
@ -20,12 +20,25 @@ Metamaps::Application.routes.draw do
|
||||||
post 'events/:event', action: :events
|
post 'events/:event', action: :events
|
||||||
get :contains
|
get :contains
|
||||||
|
|
||||||
get :request_access, to: 'access#request_access'
|
get :request_access,
|
||||||
get 'approve_access/:request_id', to: 'access#approve_access', as: :approve_access
|
to: 'access#request_access'
|
||||||
get 'deny_access/:request_id', to: 'access#deny_access', as: :deny_access
|
get 'approve_access/:request_id',
|
||||||
post :access_request, to: 'access#access_request', default: { format: :json }
|
to: 'access#approve_access',
|
||||||
post 'approve_access/:request_id', to: 'access#approve_access_post', default: { format: :json }
|
as: :approve_access
|
||||||
post 'deny_access/:request_id', to: 'access#deny_access_post', default: { format: :json }
|
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 :access, to: 'access#access', default: { format: :json }
|
||||||
|
|
||||||
post :star, to: 'stars#create', default: { format: :json }
|
post :star, to: 'stars#create', default: { format: :json }
|
||||||
|
@ -115,3 +128,4 @@ Metamaps::Application.routes.draw do
|
||||||
get 'load_url_title'
|
get 'load_url_title'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
# rubocop:enable Rubocop/Metrics/BlockLength
|
||||||
|
|
Loading…
Reference in a new issue