README.md in valkyrie-1.2.0.rc1 vs README.md in valkyrie-1.2.0.rc2
- old
+ new
@@ -121,12 +121,13 @@
This include change sets, resources, persisters, adapters, and queries. When creating your own kinds of
these kinds of classes, you should use these shared specs to test your classes for conformance to
Valkyrie's API.
When breaking changes are introduced, necessitating a major version change, the shared specs will reflect
-this. Likewise, non-breaking changes to Valkyrie can be defined as code changes that do not cause any
-errors with the current shared specs.
+this. When new features are added and a minor version is released there will be no change to the existing shared
+specs, but there may be new ones. These new shared specs will fail in your
+application if you have custom adapters, but your application will still work.
Using the shared specs in your own models is described in more [detail](https://github.com/samvera-labs/valkyrie/wiki/Shared-Specs).
### Define a Custom Work
@@ -134,12 +135,19 @@
```
# frozen_string_literal: true
class MyModel < Valkyrie::Resource
include Valkyrie::Resource::AccessControls
- attribute :title, Valkyrie::Types::Set # Sets are unordered
- attribute :authors, Valkyrie::Types::Array # Arrays are ordered
+ attribute :title, Valkyrie::Types::Set # Sets deduplicate values
+ attribute :date, Valkyrie::Types::Array # Arrays can contain duplicate values
end
+```
+
+Attributes are unordered by default. Adding `ordered: true` to an attribute definition will preserve the
+order of multiple values.
+
+```
+attribute :authors, Valkyrie::Types::Array.meta(ordered: true)
```
Defining resource attributes is explained in greater detail within the [Wiki](https://github.com/samvera-labs/valkyrie/wiki/Using-Types).
#### Work Types Generator