hana
hana copied to clipboard
Add railtie
- Fixed README example
- Add railtie so if the gem is added to a rails project it registers a mime type to respond to application/json-patch+json
Based on conversation with @steveklabnik https://github.com/steveklabnik/merge_patch_test/pull/2#issuecomment-18464734
Will do
@guillec ! Any chance you can update this? :wink:
@steveklabnik sorry :( yeah I will get do it this weekend.
On Sun, Jun 8, 2014 at 11:01 PM, Steve Klabnik [email protected] wrote:
@guillec https://github.com/guillec ! Any chance you can update this? [image: :wink:]
— Reply to this email directly or view it on GitHub https://github.com/tenderlove/hana/pull/3#issuecomment-45457694.
@tenderlove @steveklabnik updated per your suggestion.
Why can't this be in another gem? I don't think it's a good practice to include Rails stuff everywhere.
For example, I plan to use this gem in a project. It's super simple, just one file, specific for the purpose of json-patch. With this PR, I'll have more code around which I won't use. I know it doesn't really affect the code if I don't require it, but it just feels messy to throw all code in a single gem. Maybe hana-rails
would be better.