diff --git a/app/lib/seeds.rb b/app/lib/seeds.rb index 685c56c9b..b8bf8205d 100644 --- a/app/lib/seeds.rb +++ b/app/lib/seeds.rb @@ -215,6 +215,6 @@ def create_user_authorization_request_role(params = {}) end def load_all_models! - Dir[Rails.root.join('app/models/**/*.rb')].each { |f| require f } + Rails.root.glob('app/models/**/*.rb').each { |f| require f } end end diff --git a/app/models/abstract_blog_post.rb b/app/models/abstract_blog_post.rb index 2729dffe1..21eae25c8 100644 --- a/app/models/abstract_blog_post.rb +++ b/app/models/abstract_blog_post.rb @@ -21,6 +21,6 @@ def self.all end def self.blog_posts_files - Dir[Rails.root.join('config/blog_posts', api, '*.md')] + Rails.root.glob("config/blog_posts/#{api}/*.md") end end diff --git a/app/models/prolong_token_wizard.rb b/app/models/prolong_token_wizard.rb index 90e96905e..b7b7735a1 100644 --- a/app/models/prolong_token_wizard.rb +++ b/app/models/prolong_token_wizard.rb @@ -4,7 +4,7 @@ class ProlongTokenWizard < ApplicationRecord delegate :prolong!, to: :token delegate :authorization_request, to: :token - enum status: { + enum :status, { owner: 0, project_purpose: 10, contacts: 20, diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index 9e95b44b7..4a4e2ae46 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -20,8 +20,8 @@ # option on the command line or in ~/.rspec, .rspec or `.rspec-local`. # Require helpers files containing factories -Dir[Rails.root.join('spec/helpers/**/*.rb')].each { |f| require f } -Dir[Rails.root.join('spec/support/**/*.rb')].each { |f| require f } +Rails.root.glob('spec/helpers/**/*.rb').each { |f| require f } +Rails.root.glob('spec/support/**/*.rb').each { |f| require f } # Checks for pending migration and applies them before tests are run. # If you are not using ActiveRecord, you can remove this line.