No commit activity in last 3 years
No release in over 3 years
ActiveModelSerializers support for ArtirixDataModels
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.11
~> 5.0
~> 10.0

Runtime

 Project Readme

ArtirixDataModels::Ams

Gem Version Build Status

This gems adds the module ArtirixDataModels::Model::AMSCompliant

important: loading this gem will require artirix_data_models and active_model_serializers.

Usage

include the module in your ADM model.

class MyModel
  include ArtirixDataModels::Model::OnlyData
  include ArtirixDataModels::Model::AMSCompliant

  attribute :name

  attribute :id # needed

  attribute :public_title, writer_visibility: :public
  attribute :private_title, reader_visibility: :private

  attribute :remember_me, :and_me, skip: :predicate
  attribute :remember_me2, :and_me2, skip: :presence
end

In order to work properly, the model has to define:

  • id
  • updated_at or _timestamp

Changelog

0.4.0

compatible with AMS 0.10.3, which is compatible with ActiveModel::Errors

0.3.0

open ADM version to include 1.x

0.2.0

fixing AMD version required