All threads / Contributing To Open Source: Fixing A Bug In Devise Discussion

Ask A Question

Notifications

You’re not receiving notifications from this thread.

Contributing To Open Source: Fixing A Bug In Devise Discussion

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

Reply
Grzegorz Brzezinka ·

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. :)

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.

Grzegorz Brzezinka ·

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

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

Reply

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

Brendan Weibrecht ·

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...

Reply

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

Reply
Join the discussion

Want to stay up-to-date with Ruby on Rails?

Join 33,665+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    logo Created with Sketch.

    Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

    © 2020 GoRails, LLC. All rights reserved.