Now people wont one less excuse for not contributing back to rails :)
Very cool, Ryan. You sure covered a lot of territory here ... kind of like one of those cooking shows where all the vegetables and ingredients are prepared in advance, and the food has already baked in advance :-)
So this gets to the core of the main steps of making a contribution. For the more timid amongst us, do you have any pointers on some of the "pre-show" work that should go into making a patch?
For example, you mentioned in passing that it was a good idea to make sure the functionality wasn't already implemented. Now being about 9 months into RoR I am still learning a lot of things I just didn't know existed. Any tips on knowing what a good candidate is for a patch?
Thanks for all you do.
Tom
Nice walk through on contributing. With the patch you wrote couldn't you have re-written your method as:
def find_products
returning Product.scoped({}) do |conditions|
conditions! ...
conditions! ...
conditions! ...
conditions! ...
end
end
@Tom, excellent questions. As mentioned at the end of the episode, I think subscribing to the Rails Core google group is the best way to get started. Keep up with the tickets coming in, try them out, and give feedback. Sometimes there will be tickets which don't have a patch, or just include a failing test. These you can try contributing a patch to.
As for coming up with patches from scratch, that's kind of hard to do on the spot. The best thing to do is to work on a Rails application and look for possible patches that will aid your app. This will lead to patches which have a real world use case and will more likely be useful to others.
As for your second question, I've ran into that a number of times, where I thought of making a patch for something and, after a little digging, realized it was already implemented in Rails.
Usually you can tell if it's already implemented by reading the Rails source code. If you don't see it, go ahead and submit a patch and others will point you to the existing functionality if it's already implemented. If it's a larger patch, it's probably best to ask in the google group before attempting to implement it, to see if others would find it useful and if they have any ideas on the implementation.
@Mike, you would still need to call "conditions!" on a scope object. In your code it's just being called on "self" which is the search model.
Ryan,
I always add a step right after the git pull followed by rebasing my branch, and that is to rerun the tests to make sure that they still work should any changes pulled down affect them.
Hey Ryan,
thanks for this screencast. I installed git and followed your screencast to submitted a patch - only to find later that my changes to files were in the patch, but the new file I had created wasn't included. I spent a bit of time this morning trying to figure out how to get that file included in the patch, but haven't had much luck yet. Is there a good resource for learning this stuff somewhere? A walk through for first timers?
cheers, Loving your work as always.
Tim.
@Ryan,
You seem to have mispelled 'activerecord_unittest2' in the code that appears at the top of this page (just below 'Resources'), so:
create database activerecord_unittes2;
should actually read:
create database activerecord_unittest2;
Also, I believe you missed the -b flag in:
git checkout named_scope_with_bang
so it should read:
git checkout -b named_scope_with_bang
@Cassiano, Thanks for pointing these problems out! Fixed.
Ryan, Thank you. I didn't have the mocha gem installed. Got a lot of "NoMethodError: undefined method `expects'/`stubs' for ...". But once I installed it, all the tests passed. - Mike
As for your second question, I've ran into that a number of times, where I thought of making a patch for something and, after a little digging, realized it was already implemented in Rails.
[url=http://sevenportal.ru/]Evdokiyushka[/url]
Ryan, Thank you. I didn't have the mocha gem installed. Got a lot of "NoMethodError: undefined method `expects'/`stubs' for ...". But once I installed it, all the tests passed. - Mike
my web page <a href="http://www.jwebtasarim.com" >web tasarım</a>
The best thing to do is to work on a Rails application and look for possible patches that will aid your app.
For example, you mentioned in passing that it was a good idea to make sure the functionality wasn't already implemented. Now being about 9 months into RoR I am still learning a lot of things I just didn't know existed.
Now being about 9 months into RoR I am still learning a lot of things I just didn't know existed.
If you don't see it, go ahead and submit a patch and others will point you to the existing functionality if it's already implemented. If it's a larger patch, it's probably best to ask in the google group before attempting to implement it, to see if others would find it useful and if they have any ideas on the implementation.
thank you for shared <a title="büyükçekmece arçelik servisi" href="http://buyukcekmecearcelikservisi.com">büyükçekmece arçelik servisi</a> and
<a title="büyükçekmece beko servisi" href="http://buyukcekmecebekoservisi.com">büyükçekmece beko servisi</a> i follow blog
thanks nice post for beylikdüzü arçelik servisi
basur basur tedavi hemoroid basur bitkisel tedavi basur bitkisel tedavi hemoroit
Two factors are the is a high infant mortality rate in Africa, and there are lots of people dying from disease there. Families there have lots of children to counteract these problems.
<a href="http://www.anaheimwhitehousewedding.com/">rehearsal dinner</a>
The other is a guess (sorry) due to the warmer climate they tend to not be covered up for 1/2 of the year like many other places, therefore exposing their skin and bodies and causing the male arousal more often.
çemberleme makinası satışı ve pazarlama http://cembant.com.tr uzman ve kaliteli çözümler
ferroli kombi ve klima servisi bakım arıza tüm ihtiyaçlarınız için hizmetinizdeyiz.
avcılar bosch beyaz eşya, klima, kombi ve ankastre servisi
plastik şişirme makinası imalat ve teknik destek keser makina makina bizim işimiz
I like this kind of very useful articles congratulations I wish you continued success, I hope I can do this kind of article
I love it,Excellent article.I am decide to put this into use one of these days.Thank you for sharing this.To Your Success!
Your website is so much nice i would like to see all the posts but i have dont enough time to do it. Over all i loved your all the articles
After the conference, they will make many changes of their working systems. And all of the new system will be explained clearly in that conference.
<a href="http://www.dekowebtasarim.com" title="deko,web tasarım, web tasarım şirketleri, web tasarım şirketi, grafik tasarım, logo tasarım" target="_blank">Deko Web Tasarım</a>
Your post is rocking and knowledgeable... I really appreciate the way you write . I would like to read more from you.
Families there have lots of children to counteract these problems.
Thanks for screencast,Thanks a lot for your brilliant screencasts! They're one of the best Rails resources I know and extraordinarily well prepared.
Now being about 9 months into RoR I am still learning a lot of things I just didn't know existed.
Thanks a lot for your brilliant screencasts! They're one of the best Rails resources I know and extraordinarily well prepared.
Thanks for sharing your article. I really enjoyed it. I put a link to my site to here so other people can read it. My readers have about the same interets
Discount Wholesale Electronics, Wholesale Cell Phones, Electronic Gadgets and More from the Best Dropship Wholesaler
I spent a bit of time this morning trying to figure out how to get that file included in the patch, but haven't had much luck yet.
There are certainly a lot of details like that to take into consideration. That is a great point to bring up. I offer the thoughts above as general inspiration but clearly there are questions like the one you bring up where the most important thing will be working in honest good faith






