Commit e76d465b by liyijie

Add readme for example

parent 0e30fc83
...@@ -11,3 +11,16 @@ Copy migrations to your project ...@@ -11,3 +11,16 @@ Copy migrations to your project
$ rails g acts_as_pasting:migrations $ rails g acts_as_pasting:migrations
TODO: Write usage instructions here TODO: Write usage instructions here
```ruby
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
```
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment