No release in over 3 years
Low commit activity in last 3 years
An Active Record DSL extension that allows you to declare multiple associaitons with a block
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

 Project Readme

KawaiiAssociation

An ActiveRecord DSL extension that provides kawaii association syntax.

Installation

Add this line to your application's Gemfile:

gem 'kawaii_association'

And then execute:

$ bundle install

Usage

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

Contributing

Pull requests are welcome on GitHub at https://github.com/amatsuda/kawaii_association.

License

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