An ActiveRecord DSL extension that provides kawaii association syntax.
Add this line to your application's Gemfile:
gem 'kawaii_association'
And then execute:
$ bundle install
This gem extends Active Record association definition methods to take a block:
class Post < ActiveRecord::Base
has_many do
comments
end
has_one do
category dependent: :nullify
end
belongs_to do
blog touch: true
author
end
...
end
Pull requests are welcome on GitHub at https://github.com/amatsuda/kawaii_association.
The gem is available as open source under the terms of the MIT License.