Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add railtie #3

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Add railtie #3

wants to merge 5 commits into from

Conversation

guillec
Copy link

@guillec guillec commented May 28, 2013

  • 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 steveklabnik/merge_patch_test#2 (comment)

@@ -1,3 +1,5 @@
require 'railtie' if defined?(Rails)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you change this file to 'hana/railtie'? It probably wouldn't be good to have a "railtie" file at the top level.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that's a good call.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh wait, this isn't my repo o_O. I'm sure @guillec will update it :)

@guillec
Copy link
Author

guillec commented Aug 8, 2013

Will do

@steveklabnik
Copy link
Collaborator

@guillec ! Any chance you can update this? 😉

@guillec
Copy link
Author

guillec commented Jun 11, 2014

@steveklabnik sorry :( yeah I will get do it this weekend.

On Sun, Jun 8, 2014 at 11:01 PM, Steve Klabnik notifications@github.com
wrote:

@guillec https://github.com/guillec ! Any chance you can update this? [image:
😉]


Reply to this email directly or view it on GitHub
#3 (comment).

Guille Carlos added 5 commits June 16, 2014 08:20
- If the gem is added to a rails project we register a mime type to
  respond to application/json-patch+json
@guillec
Copy link
Author

guillec commented Jun 16, 2014

@tenderlove @steveklabnik updated per your suggestion.

@asterite
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants