Exceptions suck. When you are getting started on a project there is nothing worse than clicking that button, hitting enter, and then watching your software fall flat on its face. It might sound odd - then - if I were to say, more errors in your life could be a good thing.
We are close to wrapping up our 10 week Rails Course. This week we will cover a handful of topics commonly encountered in Rails projects. We then wrap up with part 2 of our Reddit on Rails exercise!
Welcome back, this week we’re going to tackle some important concepts in Ruby like Dealing with Nil and using Modules in Ruby. We are also going to cover importing data from a spreadsheet, rake, rubygems, bundler, and talk a little about Rail’s testing ecosystem.
Some times you need to see what fields changed in an object in Rails. I’ve known for awhile that you could do this before an object saved:
If you’re new to Rails and Active Record, or you’ve been using them for some time, there are likely methods you’ve been overlooking. This week I take a look at the most common SQL Query interfaces for Active Record. Finally we wrap up by talking about how Active Record allows us to chain together methods, how we can prevent SQL injection attacks on our websites, and how to read Ruby Documentation.
When most people think of great web sites they don’t think of borring pages that have to refresh every time you click something, they think of sites filled with dynamic like buttons, and moving charts and graphs. While I always encouraging having a solid site before adding any javascript extras, sometimes javascript is just the best tool for the job.
We’ve covered models, views, routing, and briefly introduced controllers. This week we’re taking the deep dive into controllers, talking about what they can do, and how we want to use them. Last week we talked about wiring things together with routing. You can watch the Recap then do the Quiz and once you’re done check out the Quiz Solution.
This past weekend I was fortunate to attend Rails Girls in SF, and help introduce Rails and the associated tech to around 40 women. After answering a number of common questions many times about the command line, I decided to take the opportunity to make some videos explaining some basic concepts.
Last week we did a whole lot of Ruby View coding, using HTML and ERB to build websites. This week we’re going to focus on routing in the lecture, and then use routing to build a rails site that uses views and models together. You can start off by watching the Recap of Week 3 and then taking the week 3 quiz before viewing the week 3 solutions.