Happy Birthday, Rails!

July 25, 2014 by Mike Clark

It was 10 years ago today that David Heinemeier Hansson announced Rails. It seems like only yesterday, and at the same time it's hard to remember what web development (or even our lives!) was like before Rails.

I recall being fed up with all the make-work involved in building J2EE apps, and Rails felt like a breath of fresh air. Coincidentally, I had been playing around with Ruby and looking for a way to use it in earnest. Building web apps with Rails offered an ideal opportunity to really dig into Ruby. And so I quickly made the jump and never looked back.

A year or so later with two Rails apps in production, Dave Thomas and I thought it might be fun to teach a public course on Rails. Nicole volunteered to coordinate it and the good folks at FGM graciously offered us a great space to teach. We figured if the first course went well then we might have enough interest to do a couple more. Turns out that the first course sold out and The Pragmatic Studio was born. Fast-forward 9 years, and we're still happily teaching Ruby and Rails! It's been an amazing ride.

Many thanks to David and the entire Rails community for creating and evolving Rails all these years! And thanks to all the good folks who've supported us over the years through our courses. Honestly, we wouldn't be here today without you!

To see how far Rails has come since 2004, here's the original "How to build a blog in 15 minutes with Rails" video (affectionately known as the Wups! video) that started the revolution:

Wups — it worked! :-)

Using Scopes to Write Custom Queries in Rails

July 15, 2014 by Mike Clark

In our Rails Level I course we look at how to define custom queries by writing class methods in models. For example, to find all events that occurred in the past (versus upcoming events), we write a past method in the Event model and then query past events using Event.past.

We build on that foundation in our Rails Level II course by learning how to write custom queries using the declarative style offered by the scope method. A scope simply names a chunk of query code, and behind the scenes it dynamically defines a class method that encapsulates the query code.

One of the keys to writing a scope is to make the query code a callable Ruby object (also called a Proc object). It's at this point that many folks are first exposed to a Ruby lambda, or the more cryptic -> shortcut. As a quick introduction to how lambdas work, check out this 3-minute excerpt from the Scopes module in our Rails Level II course where we convert the past class method to a scope:

If you found that helpful, go ahead and watch the entire Scopes module, as well as other free modules in the Rails Level II course. You can also check out the course introduction video for an overview of the application features we build in this course. Or jump right in and purchase the entire course (with downloadable HD videos!). Our course is based on Rails 4, so you'll learn and apply the most up-to-date techniques!

"I know after completing your Rails I and II courses that I can build pretty much whatever I want to in Rails. These two courses are far and away the best value-for-money Rails courses out there."

— Jonathan Mundy

Proof of Course Completion

June 24, 2014 by Nicole Clark

Want to share your accomplishment with friends, colleagues, your manager, or even prospective new employers? It's really easy. When you complete one of our online courses, it automatically shows up on your alumni page with the date of completion. For example, if you've completed all three online courses, your alumni page would look something like this:

Alumni Page

To view your alumni page, log in to your account page and click the "View Your Course Completions" link in the sidebar. You'll be taken to a page with a unique URL. Anyone you share this URL with can then admire your accomplishments! Note that if you don't have a username set in your account (it's blank by default), the URL includes your name and a few random numbers so it's not easily guessable. To personalize your alumni page URL, simply set a username in your account.

So go ahead, share your alumni page to let the world know that you're on top of your game!

« Older Posts