Skip to content

Commit 23bf2b6

Browse files
committed
Remove other mentions of organization.short_name
1 parent f818231 commit 23bf2b6

File tree

9 files changed

+8
-10
lines changed

9 files changed

+8
-10
lines changed

app/controllers/admin/organizations_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def destroy
8686

8787
def organization_params
8888
params.require(:organization)
89-
.permit(:name, :short_name, :street, :city, :state, :zipcode, :email, :url, :logo, :intake_location, :default_email_text, :account_request_id, :reminder_day, :deadline_day,
89+
.permit(:name, :street, :city, :state, :zipcode, :email, :url, :logo, :intake_location, :default_email_text, :account_request_id, :reminder_day, :deadline_day,
9090
users_attributes: %i(name email organization_admin), account_request_attributes: %i(ndbn_member_id id))
9191
end
9292

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
class HistoricalTrends::BaseController < ApplicationController
22
def cached_series(type)
3-
Rails.cache.fetch("#{current_organization.short_name}-historical-#{type}-data") { HistoricalTrendService.new(current_organization.id, type).series }
3+
Rails.cache.fetch("#{current_organization.id}-historical-#{type}-data") { HistoricalTrendService.new(current_organization.id, type).series }
44
end
55
end

app/controllers/organizations_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def organization_params
9292
request_type_formatter(params)
9393

9494
params.require(:organization).permit(
95-
:name, :short_name, :street, :city, :state,
95+
:name, :street, :city, :state,
9696
:zipcode, :email, :url, :logo, :intake_location,
9797
:default_storage_location, :default_email_text, :reminder_email_text,
9898
:invitation_text, :reminder_day, :deadline_day,

app/jobs/historical_data_cache_job.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ class HistoricalDataCacheJob < ApplicationJob
22
def perform(org_id:, type:)
33
organization = Organization.find_by(id: org_id)
44

5-
Rails.cache.write("#{organization.short_name}-historical-#{type}-data", HistoricalTrendService.new(organization.id, type).series)
5+
Rails.cache.write("#{organization.id}-historical-#{type}-data", HistoricalTrendService.new(organization.id, type).series)
66
end
77

88
def queue_name = "low_priority"

app/services/distribution_service.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ def perform_distribution_service(&block)
1010
set_error(e)
1111
rescue Errors::InsufficientAllotment => e
1212
distribution.line_items.assign_insufficiency_errors(e.insufficient_items)
13-
Rails.logger.error "[!] #{self.class.name} failed because of Insufficient Allotment #{distribution_organization.short_name}: #{distribution.errors.full_messages} [#{e.message}]"
13+
Rails.logger.error "[!] #{self.class.name} failed because of Insufficient Allotment #{distribution_organization.name}: #{distribution.errors.full_messages} [#{e.message}]"
1414
set_error(e)
1515
rescue StandardError => e
16-
Rails.logger.error "[!] #{self.class.name} failed for #{distribution_organization.short_name}: #{distribution.errors.full_messages} [#{e.inspect}]"
16+
Rails.logger.error "[!] #{self.class.name} failed for #{distribution_organization.name}: #{distribution.errors.full_messages} [#{e.inspect}]"
1717
set_error(e)
1818
ensure
1919
return self

lib/test_helpers/pdf_comparison_test_factory.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ def self.get_logo_file
1313
def self.create_organization_storage_items(logo = get_logo_file)
1414
org = Organization.create!(
1515
name: "Essentials Bank 1",
16-
short_name: "db",
1716
street: "1500 Remount Road",
1817
city: "Front Royal",
1918
state: "VA",

spec/factories/organizations.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
end
4545

4646
sequence(:name) { |n| "Essentials Bank #{n}" } # 037000863427
47-
sequence(:short_name) { |n| "db_#{n}" } # 037000863427
4847
sequence(:email) { |n| "email#{n}@example.com" } # 037000863427
4948
sequence(:url) { |n| "https://organization#{n}.org" } # 037000863427
5049
street { "1500 Remount Road" }

spec/jobs/historical_data_cache_job_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
perform_enqueued_jobs { job }
1919

20-
cached_data = Rails.cache.read("#{organization.short_name}-historical-#{type}-data")
20+
cached_data = Rails.cache.read("#{organization.id}-historical-#{type}-data")
2121
expect(cached_data).to eq(expected_data)
2222
end
2323
end

spec/requests/items_requests_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
RSpec.describe "Items", type: :request do
2-
let(:organization) { create(:organization, short_name: "my_org") }
2+
let(:organization) { create(:organization) }
33
let(:user) { create(:user, organization: organization) }
44

55
describe "while signed in" do

0 commit comments

Comments
 (0)