https://github.com/shrinerb/shrine-reform
[OUTDATED] Reform integration for Shrine
https://github.com/shrinerb/shrine-reform
form-objects reform shrine trailblazer
Last synced: about 1 year ago
JSON representation
[OUTDATED] Reform integration for Shrine
- Host: GitHub
- URL: https://github.com/shrinerb/shrine-reform
- Owner: shrinerb
- License: mit
- Created: 2016-05-08T11:49:15.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2020-01-31T06:14:06.000Z (over 6 years ago)
- Last Synced: 2025-04-21T21:23:06.621Z (about 1 year ago)
- Topics: form-objects, reform, shrine, trailblazer
- Language: Ruby
- Homepage: http://trailblazer.to/gems/reform/
- Size: 12.7 KB
- Stars: 12
- Watchers: 3
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Shrine::Plugins::Reform
Provides [Reform] integration for [Shrine].
## Installation
```ruby
gem "shrine-reform"
```
## Usage
The reform plugin can be loaded globally alongside activerecord plugin.
```rb
Shrine.plugin :activerecord
Shrine.plugin :reform
```
```rb
class Post < ActiveRecord::Base
include ImageUploader::Attachment.new(:image)
end
```
```rb
class PostForm < Reform::Form
include ImageUploader::Attachment.new(:image)
end
```
## Contributing
You can run tests with the Rake task:
```
$ bundle exec rake test
```
## License
[MIT](LICENSE.txt)
[Reform]: https://github.com/apotonick/reform
[Shrine]: https://github.com/shrinerb/shrine