Skip to content

Commit af3def7

Browse files
committed
ds muäs so
1 parent 5411381 commit af3def7

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

app/helpers/person_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def sorted_people
8383

8484
def fetch_ptime_or_skills_data
8585
all_skills_people = Person.all.map { |p| [p.name, person_path(p)] }
86-
return all_skills_people unless ptime_available?
86+
return all_skills_people unless Skills.ptime_available?
8787

8888
ptime_employees = Ptime::Client.new.request(:get, 'employees', { per_page: 1000 })
8989
build_dropdown_data(ptime_employees)

config/application.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313
Bundler.require(*Rails.groups)
1414

1515
module Skills
16+
def self.ptime_available?
17+
ActiveModel::Type::Boolean.new.cast(ENV.fetch('PTIME_API_ACCESSIBLE', true))
18+
end
19+
1620
class Application < Rails::Application
1721
# Initialize configuration defaults for originally generated Rails version.
1822
config.load_defaults 7.0

0 commit comments

Comments
 (0)