diff --git a/Gemfile b/Gemfile index b30f06225..331630639 100644 --- a/Gemfile +++ b/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 diff --git a/app/controllers/sessions_controller.rb b/app/controllers/sessions_controller.rb index 6106e0c75..47870d38d 100644 --- a/app/controllers/sessions_controller.rb +++ b/app/controllers/sessions_controller.rb @@ -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 diff --git a/app/models/crop.rb b/app/models/crop.rb index 96605bd23..ebd23f150 100644 --- a/app/models/crop.rb +++ b/app/models/crop.rb @@ -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)