Sha256: c453b67cf6eb71c0f2703664373f5f9a238db9b0f65a2105a9c7575b20cb97ab
Contents?: true
Size: 369 Bytes
Versions: 6
Compression:
Stored size: 369 Bytes
Contents
module ActiveAdminAddons class ImageBuilder < CustomBuilder def render return nil if data.nil? raise "you need to pass a paperclip image attribute" unless data.respond_to?(:url) style = options.fetch(:style, :original) context.image_tag(data.url(style)) if data.file? end end end ActiveAdminAddons::ImageBuilder.create_view_methods
Version data entries
6 entries across 6 versions & 2 rubygems