Skip to content

Commit

Permalink
use autoload for file so that explict requires are not required
Browse files Browse the repository at this point in the history
  • Loading branch information
lsylvester committed May 27, 2022
1 parent 5a04f10 commit b07df4c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 4 additions & 1 deletion lib/active_storage/postgresql.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

module ActiveStorage
module PostgreSQL
# Your code goes here...
extend ActiveSupport::Autoload

autoload :File, "active_storage/postgresql/file"

end
end
2 changes: 0 additions & 2 deletions lib/active_storage/service/postgresql_service.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# frozen_string_literal: true

require 'active_storage/postgresql/file'

module ActiveStorage
# Wraps a PostgreSQL database as an Active Storage service. See ActiveStorage::Service for the generic API
# documentation that applies to all services.
Expand Down

0 comments on commit b07df4c

Please sign in to comment.