# 花月(Kagetsu) [![CircleCI](https://circleci.com/gh/taki/kagetsu.svg?style=svg)](https://circleci.com/gh/taki/kagetsu) kagetsu is a library for create or update method on ActiveRecord. ## Requirement - Rails 5.2 or upper ## Usage ```ruby User.create!(name: 'kotoko', email: 'old@example.com') user = User.create_or_update(key: { name: 'kotoko' }, update_attributes: { email: 'new@example.com' }) user.email #=> new@example.com ``` ## Available Methods - ActiveRecord::Base#create_or_update - ActiveRecord::Base#create_or_update!