Skip to content

Azdaroth/active_model_attributes

Repository files navigation

ActiveModelAttributes Build Status Gem Version Coverage Status

Rails 5.0 comes with a great addition of ActiveRecord Attributes API. However, that's only for ActiveRecord, you can't really use it in your ActiveModel models. Fortunately, with this gem it's possible.

Installation

Add this line to your application's Gemfile:

gem 'active_model_attributes'

And then execute:

$ bundle

Or install it yourself as:

$ gem install active_model_attributes

Usage