Sha256: 2bcada36bfa501968a5325d3e45964167b76fb0431e97ed40f2588777bc63b30

Contents?: true

Size: 536 Bytes

Versions: 2

Compression:

Stored size: 536 Bytes

Contents

include ActionView::Helpers::AssetTagHelper

module Uploadcare
  module Rails
    class Group < Uploadcare::Api::Group

      # override default to string method
      # for group we just will return the uuid
      def to_s
        uuid
      end

      private
        def map_files data
          data["files"].map! do |file|
            unless file.nil?
              Uploadcare::Rails::File.new(@api, file["uuid"], file)
            else
              file
            end
          end

          data
        end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
uploadcare-rails-1.0.1 lib/uploadcare/rails/group.rb
uploadcare-rails-1.0.0.rc4 lib/uploadcare/rails/group.rb