Skip to content

Commit b07df4c

Browse files
committed
use autoload for file so that explict requires are not required
1 parent 5a04f10 commit b07df4c

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

lib/active_storage/postgresql.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
module ActiveStorage
44
module PostgreSQL
5-
# Your code goes here...
5+
extend ActiveSupport::Autoload
6+
7+
autoload :File, "active_storage/postgresql/file"
8+
69
end
710
end

lib/active_storage/service/postgresql_service.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# frozen_string_literal: true
22

3-
require 'active_storage/postgresql/file'
4-
53
module ActiveStorage
64
# Wraps a PostgreSQL database as an Active Storage service. See ActiveStorage::Service for the generic API
75
# documentation that applies to all services.

0 commit comments

Comments
 (0)