Sha256: c029d68f9133564bbf514262f7b1eee566c5093655f16262dfbc765d49395197

Contents?: true

Size: 795 Bytes

Versions: 1

Compression:

Stored size: 795 Bytes

Contents

[![Gem Version](https://badge.fury.io/rb/activefedora-aggregation.svg)](http://badge.fury.io/rb/activefedora-aggregation) [![Build Status](https://circleci.com/gh/projecthydra-labs/activefedora-aggregation.svg?style=shield&circle-token=:circle-token)](https://circleci.com/gh/projecthydra-labs/activefedora-aggregation)
# ActiveFedora::Aggregation

Aggregations for ActiveFedora.

### Example
```ruby
class GenericFile < ActiveFedora::Base
end

generic_file1 = GenericFile.create(id: 'file1')
generic_file2 = GenericFile.create(id: 'file2')

class Image < ActiveFedora::Base
  aggregates :generic_files
end

image = Image.create(id: 'my_image')
image.generic_files = [generic_file2, generic_file1]
image.save

```

Now the `generic\_files` method returns an ordered list of GenericFile objects.

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
activefedora-aggregation-0.3.0 README.md