diff --git a/README.md b/README.md index f524d38..21780e8 100644 --- a/README.md +++ b/README.md @@ -349,36 +349,17 @@ bee.first_name = "Queen" bee.attributes # => { "First Name": "Queen", "Last Name": "Buzz" } ``` -### FmRest::Layout.has_portal - -You can define portal associations on your model wth `has_portal`, as such: - -```ruby -class Honeybee < FmRest::Layout - has_portal :flowers -end - -class Flower < FmRest::Layout - attributes :color, :species -end -``` +#### Dirty attributes -See the [main document on portal associations](docs/Portals.md) for details. - -### Dirty attributes - -fmrest-ruby includes support for ActiveModel's Dirty mixin out of the box, -providing methods like: +fmrest-ruby includes support for ActiveModel's Dirty mixin for attributes +declared with `attributes`, providing methods like: ```ruby bee = Honeybee.new - bee.changed? # => false bee.name = "Maya" - bee.changed? # => true - bee.name_changed? # => true ``` @@ -388,6 +369,22 @@ to the server on save. You can read more about [ActiveModel's Dirty in Rails Guides](https://guides.rubyonrails.org/active_model_basics.html#dirty). +### FmRest::Layout.has_portal + +You can define portal associations on your model wth `has_portal`, as such: + +```ruby +class Honeybee < FmRest::Layout + has_portal :flowers +end + +class Flower < FmRest::Layout + attributes :color, :species +end +``` + +See the [main document on portal associations](docs/Portals.md) for details. + ### Query API Since Spyke is API-agnostic it only provides a wide-purpose `.where` method for