Skip to content

Commit cf7d091

Browse files
committed
Fix lint failures
1 parent 11f9ece commit cf7d091

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

app/models/organization.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,8 @@ def ordered_requests
167167

168168
# Computes full address string based on street, city, state, and zip, adding ', ' and ' ' separators
169169
def address
170-
state_and_zip = [state, zipcode].select(&:present?).join(' ')
171-
[street, city, state_and_zip].select(&:present?).join(', ')
170+
state_and_zip = [state, zipcode].compact_blank.join(' ')
171+
[street, city, state_and_zip].compact_blank.join(', ')
172172
end
173173

174174
def address_changed?
@@ -298,6 +298,6 @@ def get_admin_email
298298
end
299299

300300
def logo_size_check
301-
errors.add(:logo, 'File size is greater than 1 MB') if logo.byte_size > 1.megabytes
301+
errors.add(:logo, 'File size is greater than 1 MB') if logo.byte_size > 1.megabyte
302302
end
303303
end

spec/rails_helper.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@
3131
# directory. Alternatively, in the individual `*_spec.rb` files, manually
3232
# require only the support files necessary.
3333
#
34-
Dir[Rails.root.join("spec/support/**/*.rb")].sort.each { |f| require f }
35-
Dir[Rails.root.join("spec/controllers/shared_examples/*.rb")].sort.each { |f| require f }
34+
Rails.root.glob("spec/support/**/*.rb").sort.each { |f| require f }
35+
Rails.root.glob("spec/controllers/shared_examples/*.rb").sort.each { |f| require f }
3636

3737
# Checks for pending migration and applies them before tests are run.
3838
# If you are not using ActiveRecord, you can remove this line.

spec/system/storage_location_system_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,8 @@
185185
create(:storage_location, :with_items, item: item3, item_quantity: 10, name: "Baz")
186186
visit subject
187187

188-
expect(page.all('select[name="filters[containing]"] option').map(&:text).select(&:present?)).to eq(expected_order)
189-
expect(page.all('select[name="filters[containing]"] option').map(&:text).select(&:present?)).not_to eq(expected_order.reverse)
188+
expect(page.all('select[name="filters[containing]"] option').map(&:text).compact_blank).to eq(expected_order)
189+
expect(page.all('select[name="filters[containing]"] option').map(&:text).compact_blank).not_to eq(expected_order.reverse)
190190
end
191191
end
192192

0 commit comments

Comments
 (0)