Skip to main content

Contributing To Open Source: Fixing A Bug In Devise Discussion

General • Asked by Chris Oliver
17c3d86139e890e0fa21473ffc0904f9

Awesome post! I was just looking around today to see how to go about contributing open source projects!


Bc29223bc80b3bd2f50d365776aaa636

This is awesome you contributed to so popular open source project, but it is a good and recommended practice to provide a basic test of the functionality you have fixed. I mean a test that was failing and your fix made it pass. In that and only that way you can ensure that future changes to this project (Devise) will not break your fix. :)

Ce795239ba5dd2384fc2f88ffaff5451

Absolutely correct on that. Normally I would write a test for it, but this is not core functionality to Devise and tests for little tiny things like this don't really add much other than slowing down your test suite. There are still tests that make sure the generators still run correctly so it still works. If the functionality ever got reverted back to the original on accident, it wouldn't be a big deal. You could certainly add a test, but I'd argue how much value you actually get out of it in this case.

Bc29223bc80b3bd2f50d365776aaa636

I understand your point for this particular case :) So on second thought, I agree with you!

Ce795239ba5dd2384fc2f88ffaff5451

I meant to mention this in the video so thanks for bringing it up! :)


048de6d55004fb1bec6ba91ab303e7f9

Beautiful Chris! The `presence` method trick was really nice too. Thanks for this amazing contribution.

00ce02622e73e4be8a949081dbfbe111

While watching, I was wondering what the point of calling `presence` was, when you can just use the variable name alone for that trick. It turns out `presence` also returns nil for an empty string, which makes sense in this case.

http://stackoverflow.com/qu...


9438b2cb17c23453bc49deaf51889597

very usefull. thanks. just did my first little pull request.


Login or Create An Account to join the conversation.

Subscribe to the newsletter

Join 18,000+ developers who get early access to new screencasts, articles, guides, updates, and more.

By clicking this button, you agree to the GoRails Terms of Service and Privacy Policy.

More of a social being? We're also on Twitter and YouTube.