Skip to content

Commit

Permalink
Fix ImageResource.to_hash
Browse files Browse the repository at this point in the history
  • Loading branch information
elektronaut committed Oct 14, 2024
1 parent 9048a68 commit 994091b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/helpers/pages_core/admin/image_uploads_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def editable_image_src_options(image, width)
return {} unless image

{ src: dynamic_image_path(image, size: "#{width * 2}x"),
image: ::Admin::ImageResource.new(image).to_hash }
image: ::Admin::ImageResource.new(image).to_h }
end

def editable_image_options(image, width: 250, caption: false, locale: nil)
Expand Down
2 changes: 1 addition & 1 deletion app/resources/admin/page_resource.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def image_uploader(image)
return { src: nil, image: nil } unless image

{ src: dynamic_image_path(image, size: "500x"),
image: ::Admin::ImageResource.new(image).to_hash }
image: ::Admin::ImageResource.new(image).to_h }
end

def localized_objects
Expand Down

0 comments on commit 994091b

Please sign in to comment.