Tip #29 - Stop a Mongrel (or any) Service in Windows
Wed Dec 23 03:21:33 -0800 2009
If you are running a rails app on Windows Server (GASP) then you will run into the problem of how to restart your apps?
Read the rest of this entryTip #28 - Separate the things that change from the things that stay the same
Sat Jul 12 18:21:30 -0700 2008
When you are coding, you should try to separate out the things that change from the things that stay the same. This isn’t my idea, but it is worth tip’n here as I just saw a really good, simple example of this…
Read the rest of this entryTip #27 - Spec a Behaviour, Not an Implementation
Fri Jun 27 10:48:48 -0700 2008
This has been said a lot, and doesn’t really need repeating by someone like me, but, as this is a tips page, I should put it here.
Read the rest of this entryTip #26 - Start Small
Tue Jun 24 07:22:38 -0700 2008
If you are getting frustrated with RSpec, then you have probably skipped a gradient. Start smaller!
Read the rest of this entryTip #25 - Logging is your friend...
Tue Jun 24 07:18:17 -0700 2008
Sometimes when you need someone to just look over your code and figure out what the heck is going on, you can turn to your best coding friend, this friend sits away in the log directory carefully collecting data waiting for your beck and call…
Read the rest of this entryTip #24 - Being clever in specs is for dummies
Mon Jun 23 21:30:31 -0700 2008
This tip is coming to you from a frustrated developer having to read someone else’s specs….
Read the rest of this entryTip #23 - Know your fundamentals
Fri Jun 20 16:15:31 -0700 2008
You would expect any professional to know their stuff, for a Ruby on Rails beginner, this is no less important.
Read the rest of this entryTip #22 - How to ask a question about Rails
Wed Jun 04 19:24:14 -0700 2008
This tip actually applies to every open source project out there… it is, how do you ask a question that will get you the maximum chance of a good answer?
Read the rest of this entryTip #21 - Developer Info On Every Page
Mon Jun 02 07:37:55 -0700 2008
When you are making a rails site, you sometimes need to get to the session hash or the params hash and see just what got sent back to the browser, but going in, editing the template and reloading is just a PITA, here is a quick tip that can help you have that (and any other) information no more than a click away, at any time, and any view….
Read the rest of this entryTip #20 - Subscribe to Rails Envy
Mon May 26 20:02:10 -0700 2008
Even though they got my name wrong :) Gregg Poolak and Jason Seinfield have a fantastic podcast that you all should subscribe to.
Read the rest of this entryTip #19 - Raaums Hints Rock
Mon May 26 19:50:16 -0700 2008
When I was learning Ruby on Rails, this site by Raaum was a god send.
Read the rest of this entryTip #18 - Take Back Your App Folder!
Sat May 17 17:14:13 -0700 2008
Contrary to popular (?) belief, your app folder’s content is not restricted to models, controllers, helpers and views. You can through some other stuff in there as well!
Read the rest of this entryTip #17 - Struct Your Stuff!
Mon May 12 17:31:38 -0700 2008
Ruby is a really dynamic language, and you can do a lot of cool things, one of them is a Struct (Structure) that allows you to make throw away objects that you can call methods on….
Read the rest of this entryTip #16 - Valid Models Don't Have to be Hard
Sun May 11 14:38:18 -0700 2008
If you are using BE DE DE or TE DE DE, then you will get situations in your specs or tests where you want to be able to just create a valid model of another type to test against. This is where factories and builders come in handy.
Read the rest of this entryTip #15 - Read Other People's Code
Fri Apr 25 20:56:42 -0700 2008
It is a great tip, and one I do fairly often, go download some code and read it until you understand it.
Read the rest of this entryTip #14 - Custom Error Messages in Validations
Tue Apr 22 18:10:20 -0700 2008
If you use Rails, you sometimes get a situation where the custom error messages just don’t work, here is how you can fix it…
Read the rest of this entryTip #13 - BangBang Transformations!
Tue Apr 22 18:02:21 -0700 2008
Ruby is marvelous, everything evaluates. Which means a lot of the time, you can get away with things like ‘if @user…” and just depend on the existence of the @user var. But what if you just really need a Boolean true or false? Here is a little pattern you can use to do this…
Read the rest of this entryTip #12 - HTML and HTTP are Your Friends
Sun Apr 20 07:26:31 -0700 2008
What is an <em> tag? How do you manually make a select box? What about a multi value select box? Do you know the difference between a <submit> tag and a <button> tag? Can you hand code a form to make a restful post to one of your Rails controllers? If you can’t do all the above with plain HTML and no rails helpers or don’t know the difference between a GET and POST request and when you use either, then you need to read on. If you can, feel free to skip to the next section.
Read the rest of this entryTip #11 - Transact Your Migrations!
Thu Apr 17 10:23:10 -0700 2008
If you are using Rails, you are most likely using migrations. Have you ever had a migration fail half way through? Have you ever then had to figure out how to find each change and revert it in the database? Would you like to never have to do that again? Here is how…
Read the rest of this entryTip #10 - The Ruby Language
Thu Apr 17 07:40:40 -0700 2008
Learning Rails is hard enough without also facing the task of learning Ruby at the same time. Here I go over some of the must knows in Ruby so that you get some basic understanding of how to do Rails.
Read the rest of this entryTip #9 - Learn Programming Theory
Wed Apr 16 13:18:55 -0700 2008
Being a Rails developer means that, yes, you too need to learn how to (gasp) program! No, seriously! Here are my tips on that subject.
Read the rest of this entryTip #8 - Must Know Facets of Ruby on Rails
Wed Apr 16 12:38:59 -0700 2008
Sometimes it is easy to forget that when you take the plunge to learn something as encompassing as ruby on Rails, you forget just how MUCH you need to learn, and it can all seem a bit overwhelming at first. Here is a good way to go about learning it.
Read the rest of this entryTip #7 - Shell Shortcuts You Should Know and Love
Tue Apr 15 12:08:32 -0700 2008
Face it, you use Ruby, you use Rails, you are going to use the shell, either in the console or directly, here are some shortcuts I can’t live without.
Read the rest of this entryTip #6 - Validating the Domain of an Email Address with Ruby on Rails
Sun Apr 13 21:26:09 -0700 2008
So, in the last two tips, I have shown how to check the format of the email and save the actual address only in the database. But how to check that the email domain name is valid? Easy!
Read the rest of this entryTip #5 - Cleaning Up an Email Address with Ruby on Rails
Sun Apr 13 20:48:10 -0700 2008
So you have an email address field on a form in Rails, but how are you going to make sure that all those users enter a sane and well formatted email address? Here is a simple fix to that problem.
Read the rest of this entryTip #4 - Validating an Email Address with Ruby on Rails
Sun Apr 13 17:27:28 -0700 2008
Did you know that Rails has inbuilt a strong email handling library called (ahem) TMail? I just so happen to maintain this now (Minero Aoki wrote it), but it gives you a great way to validate email addresses…
Read the rest of this entryTip #3 - Sexy Date Select Fields!
Sat Apr 12 11:31:45 -0700 2008
Tired of having 5 different pick lists or spinners to set a date on your form? Me too, that’s why calendar_date_select was made, and it’s soo easy to install…
Read the rest of this entryTip #2 - Daemonize Your Gems!
Fri Apr 11 21:15:24 -0700 2008
If you program in Ruby on Rails and or Ruby, you will find yourself firing up “gem server” all the time, so why not make it automatic?
Read the rest of this entryTip #1 - Subscribe to the Railscasts
Thu Apr 10 11:09:06 -0700 2008
After watching Ryan’s 100th episode with the special duck typing sound effect at the start, he mentions a competition for the whole Ruby on Rails community. So here is my first tip!
Read the rest of this entry