Skip to content

Commit

Permalink
Fixing issue in shrine.rb undefined method url
Browse files Browse the repository at this point in the history
  • Loading branch information
nezirz committed Apr 4, 2023
1 parent 5a958e4 commit 6fb120d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rails_admin/config/fields/types/shrine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class Shrine < RailsAdmin::Config::Fields::Types::FileUpload
def resource_url(thumb = nil)
return nil unless value

thumb && bindings[:object].public_send(:"#{name}", thumb).try(:url) || value.url
thumb && bindings[:object].public_send(:"#{name}", thumb).try(:url) || value[value.keys.first].url
end
end
end
Expand Down

0 comments on commit 6fb120d

Please sign in to comment.