Skip to content

Commit

Permalink
Work without ActiveStorage (#3215)
Browse files Browse the repository at this point in the history
* Work without ActiveStorage

if ActiveStorage is not included, then we see the error uninitialized constant Avo::Fields::Common::Files::ControlsComponent::ActiveStorage

* Update app/components/avo/fields/common/files/controls_component.rb

* Update app/components/avo/fields/common/files/view_type/grid_item_component.rb

---------

Co-authored-by: Paul Bob <[email protected]>
  • Loading branch information
jpawlyn and Paul-Bob committed Sep 5, 2024
1 parent 4f318a8 commit 3316e4a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class Avo::Fields::Common::Files::ControlsComponent < Avo::BaseComponent
delegate :id, to: :@field

prop :field, Avo::Fields::BaseField
prop :file, ActiveStorage::Attachment
prop :file, _Any
prop :resource, Avo::BaseResource

def destroy_path
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
class Avo::Fields::Common::Files::ViewType::GridItemComponent < Avo::BaseComponent
prop :field, Avo::Fields::BaseField
prop :resource, Avo::BaseResource
prop :file, _Nilable(ActiveStorage::Attachment)
prop :file, _Nilable(_Any)
prop :extra_classes, _Nilable(String)

def id
Expand Down

0 comments on commit 3316e4a

Please sign in to comment.