Skip to content

retailzipline/active_record_nested_attribute_id_extension

Repository files navigation

ActiveRecord Nested Attribute ID support

ActiveRecord's nested attributes do not allow you to provide an id when creating the nested objects. If you provide an ID, it results in an ActiveRecord::NotFound error message.

This patches ActiveRecord so that you can override that behavior by passing an attribute named _create when creating nested objects. This is similar to the _destroy behavior.

Installation

Add this line to your application's Gemfile:

gem 'active_record_nested_attribute_id_extension'

And then execute:

$ bundle

Or install it yourself as:

$ gem install active_record_nested_attribute_id_extension

License

The gem is available as open source under the terms of the MIT License.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published