mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-08-02 19:05:52 -04:00
rubocop lint fixes
This commit is contained in:
2
Gemfile
2
Gemfile
@@ -143,7 +143,7 @@ group :development, :test do
|
||||
gem 'haml-i18n-extractor'
|
||||
gem 'haml-rails' # HTML templating language
|
||||
gem 'haml_lint', '>= 0.25.1' # Checks haml files for goodness
|
||||
gem 'i18n-tasks' # adds tests for finding missing and unused translations
|
||||
gem 'i18n-tasks' # adds tests for finding missing and unused translations
|
||||
# gem 'poltergeist' # for headless JS testing
|
||||
gem 'rspec-activemodel-mocks'
|
||||
gem 'rspec-rails' # unit testing framework
|
||||
|
||||
@@ -3,9 +3,7 @@ class SessionsController < Devise::SessionsController
|
||||
|
||||
def create
|
||||
super do |_resource|
|
||||
if Crop.pending_approval.present? && current_member.role?(:crop_wrangler)
|
||||
flash[:alert] = "There are crops waiting to be wrangled."
|
||||
end
|
||||
flash[:alert] = "There are crops waiting to be wrangled." if Crop.pending_approval.present? && current_member.role?(:crop_wrangler)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -55,9 +55,7 @@ class Crop < ApplicationRecord
|
||||
|
||||
####################################
|
||||
# Elastic search configuration
|
||||
if ENV["GROWSTUFF_ELASTICSEARCH"] == "true"
|
||||
searchkick word_start: %i(name alternate_names scientific_names), case_sensitive: false
|
||||
end
|
||||
searchkick word_start: %i(name alternate_names scientific_names), case_sensitive: false if ENV["GROWSTUFF_ELASTICSEARCH"] == "true"
|
||||
|
||||
def planting_photos
|
||||
Photo.joins(:plantings).where("plantings.crop_id": id)
|
||||
|
||||
Reference in New Issue
Block a user