Name Last update
bin Loading commit data...
db/migrate Loading commit data...
lib Loading commit data...
.gitignore Loading commit data...
Gemfile Loading commit data...
README.md Loading commit data...
Rakefile Loading commit data...
pasting.gemspec Loading commit data...

Whaleback

Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file lib/whaleback. To experiment with that code, run bin/console for an interactive prompt.

TODO: Delete this and the text above, and describe your gem

Usage

Copy migrations to your project

$ rails g acts_as_pasting:migrations

TODO: Write usage instructions here

class Teacher < ApplicationRecord
  include ActsAsPasting::Pasted
  pasted_with ::Duty
  acts_as_pasted :duties, source_type: 'Duty'
end

class Duty < ApplicationRecord
  include ActsAsPasting::Pastable
  acts_as_pastable :teachers, source_type: 'Teacher'
end