-
Notifications
You must be signed in to change notification settings - Fork 330
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- merged two methods to reduce duplicate logic - simplified require for active_storage install
- Loading branch information
Showing
2 changed files
with
7 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,6 @@ | ||
class ActiveScaffold::Bridges::ActiveStorage < ActiveScaffold::DataStructures::Bridge | ||
def self.install | ||
if ActiveScaffold::Config::Core.method_defined?(:initialize_with_active_storage) | ||
raise "We've detected that you have active_scaffold_active_storage_bridge installed. This plugin has been moved to core. Please remove active_scaffold_active_storage_bridge to prevent any conflicts" | ||
end | ||
require File.join(File.dirname(__FILE__), 'active_storage/active_storage_bridge') | ||
require File.join(File.dirname(__FILE__), 'active_storage/form_ui') | ||
require File.join(File.dirname(__FILE__), 'active_storage/list_ui') | ||
require File.join(File.dirname(__FILE__), 'active_storage/active_storage_helpers') | ||
Dir[File.join(__dir__, 'active_storage', '*.rb')].each { |file| require file } | ||
ActiveScaffold::Config::Core.send :prepend, ActiveScaffold::Bridges::ActiveStorage::ActiveStorageBridge | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters