mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-10-27 01:08:30 -04:00
Rubocop style fix ups
This commit is contained in:
1 parent
d7cc219569
commit
05bfbda5f5
7 files changed
+8
-9
No files matched your search
@@ -23,11 +23,11 @@ class ApplicationController < ActionController::Base
|
||||
render file: 'app/views/errors/404', status: :not_found, layout: false
|
||||
end
|
||||
|
||||
def after_sign_in_path_for(resource)
|
||||
def after_sign_in_path_for(_resource)
|
||||
stored_location_for(:member) || root_path
|
||||
end
|
||||
|
||||
def after_sign_out_path_for(resource_or_scope)
|
||||
def after_sign_out_path_for(_resource_or_scope)
|
||||
request.referer
|
||||
end
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
class PasswordsController < Devise::PasswordsController
|
||||
protected
|
||||
|
||||
def after_resetting_password_path_for(resource)
|
||||
def after_resetting_password_path_for(_resource)
|
||||
root_path
|
||||
end
|
||||
end
|
||||
@@ -46,7 +46,7 @@ class RegistrationsController < Devise::RegistrationsController
|
||||
end
|
||||
|
||||
# check if we need the current password to update fields
|
||||
def needs_password?(member, params)
|
||||
def needs_password?(_member, params)
|
||||
params[:member][:password].present? ||
|
||||
params[:member][:password_confirmation].present?
|
||||
end
|
||||
@@ -1,5 +1,5 @@
|
||||
class ApprovedValidator < ActiveModel::EachValidator
|
||||
def validate_each(record, attribute, value)
|
||||
def validate_each(record, attribute, _value)
|
||||
record.errors[attribute] << (options[:message] || 'must be approved') unless record.crop.try(:approved?)
|
||||
end
|
||||
end
|
||||
@@ -21,7 +21,6 @@ chdir APP_ROOT do
|
||||
# Install JavaScript dependencies if using Yarn
|
||||
# system('bin/yarn')
|
||||
|
||||
|
||||
# puts "\n== Copying sample files =="
|
||||
# unless File.exist?('config/database.yml')
|
||||
# cp 'config/database.yml.sample', 'config/database.yml'
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
VENDOR_PATH = File.expand_path('..', __dir__)
|
||||
Dir.chdir(VENDOR_PATH) do
|
||||
begin
|
||||
exec "yarnpkg #{ARGV.join(" ")}"
|
||||
exec "yarnpkg #{ARGV.join(' ')}"
|
||||
rescue Errno::ENOENT
|
||||
warn "Yarn executable was not detected in the system."
|
||||
warn "Download Yarn at https://yarnpkg.com/en/docs/install"
|
||||
|
||||
+2
-2
@@ -9,7 +9,7 @@ before_fork do |_server, _worker|
|
||||
Process.kill 'QUIT', Process.pid
|
||||
end
|
||||
|
||||
defined?(ActiveRecord::Base) and
|
||||
defined?(ActiveRecord::Base) &&
|
||||
ActiveRecord::Base.connection.disconnect!
|
||||
end
|
||||
|
||||
@@ -18,6 +18,6 @@ after_fork do |_server, _worker|
|
||||
puts 'Unicorn worker intercepting TERM and doing nothing. Wait for master to sent QUIT'
|
||||
end
|
||||
|
||||
defined?(ActiveRecord::Base) and
|
||||
defined?(ActiveRecord::Base) &&
|
||||
ActiveRecord::Base.establish_connection
|
||||
end
|
||||
Reference in new issue
Block a user