Files
activeadmin-quill_editor/lib/activeadmin/quill_editor/engine.rb
Gleb Tv 0a12969370 refactor: Remove jQuery dependency and consolidate JavaScript assets
- Rename vendor JS file to activeadmin/quill_editor.js to avoid conflicts
- Update import alias to use 'activeadmin/quill_editor' for consistency
- Remove jQuery-dependent legacy file (quill_editor_input.js)
- Simplify engine asset configuration - only one JS file now
- Update documentation with correct paths and import names
- All functionality preserved with vanilla JavaScript

BREAKING CHANGE: Drops support for jQuery-based initialization.
Applications using the legacy jQuery initialization will need to
update to the new module-based approach.

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-24 14:42:54 +03:00

30 строки
823 B
Ruby

# frozen_string_literal: true
require 'active_admin'
module ActiveAdmin
module QuillEditor
class Engine < ::Rails::Engine
engine_name 'activeadmin_quill_editor'
# Propshaft automatically includes vendor/assets and app/assets paths
# No need for explicit asset path configuration with Propshaft
initializer 'activeadmin_quill_editor.assets' do |app|
# Add assets to precompile list for both Propshaft and Sprockets
if app.config.respond_to?(:assets)
app.config.assets.precompile += %w[
activeadmin/quill_editor.js
]
end
end
initializer 'activeadmin_quill_editor.formtastic' do
ActiveSupport.on_load :active_admin do
require 'formtastic/inputs/quill_editor_input'
end
end
end
end
end