Learn how to save data such as bank information, social security number, or other sensitive information in your Rails application securely by encrypting the data. By using spikex’s gem Strongbox, you can use private and public keys to secure your data in your database to where you must have the password to decrypt them. Download 107.9 MB Download (iphone & ipod) 34.6 MB
Last week, my development team and I ran across a problem with a library we had written several months before that parsed spreadsheets given to us by one of our clients and inserted the data provided into the database. At the time we weren’t sure what the problem was. We decided to run the tests and two frustratingly useless things occurred. First, all of the tests passed. Second, the test suite took 3 hours to run.
Here’s what we had done in our “unit tests.” We had placed several of these spreadsheets as examples into our fixtures folder. Then, we had created the importer object and told it to import. We then checked the results. These tests take a long time, specifically because an import can sometimes take 15 minutes depending on the amount of data we need to import. So, how do you fix something like that? Here are some ideas.
This is my first screencast. I’ve learned a lot about recording screencasts while doing this. The screencast was recorded using a free trial of Camtasia for Mac. The trial is up in 30 days, so I’d really appreciate donations to help me get ScreenFlow so I can continue to produce screencasts.
In the meantime, here’s a basic rundown of the 4 basic types of routes in Ruby on Rails.
Ruby on Rails gives you some simple but powerful tools for mapping URL’s and HTTP Verbs to your Controllers and Views. Here is a simple walkthrough of 4 of these ‘Routes’: default routes, regular routes, named routes, and RESTful routes.
Ruby on Rails gives you some simple but powerful tools for mapping URL’s and HTTP Verbs to your Controllers and Views. Here is a simple walkthrough of 4 of these ‘Routes’: default routes, regular routes, named routes, and RESTful routes. Download 65 MB Download (iphone & ipod) 28 MB
When I first set up this blog and purchased the domain, I intended to post about any technology that I came in contact with. However, after owning it for a year and not really putting anything into it, I determined that I would post about what I enjoyed the most—Ruby on Rails.
Over the last year, however, I’ve had two experiences that have altered the way I view programming and have helped me learn more about what I want and where I’d like to take my career. So, after careful consideration, I have decided to shift my focus a bit regarding my posting habits.
First, I intend to explore other languages. This does not mean I won’t be posting about Ruby and Rails anymore. I enjoy those languages and mean for them to be the central language and framework in my career path. But I will be posting tidbits from other languages as well.
Second, I keep learning and hearing about Agile Development practices. The more I hear, the more I like—generally. There are some finer points on some of the methodology implementations that I don’t agree with and I’d like to explore which methodologies I like and get feedback from other people who have put Agile Development into place on their teams regarding what works and doesn’t work for them.
Finally, I’ve found over the years that there is one thing I enjoy almost as much as programming—coaching. So, I’m going to start including articles about moving from a Junior Developer level to a Senior Developer level. I’m also going to cover general programming topics. And I’m going to include resources for others who are coaching some Junior Developers at work or on their own.
I hope you enjoy reading this blog as much as I enjoy writing for it. I appreciate any and all feedback regarding the content or topics I choose to place here.
I just started building a new Rails application in version 2.3.4. One feature that I thought was particularly handy is the data seeding that is now built into Ruby on Rails.
Before this feature, you would have to do one of two things. You could seed your data in your migrations. The problem with this approach is that it clutters up your migrations, and can make for more brittle migrations. It also may or may not propagate to your test database when you run your tests, meaning that if you’re counting on it, it may not bee there.
Your second option was to create fixtures and a rake task to import the fixture data into your Rails application. The problem with this is the need to create multiple related objects across multiple files to make all of your data match up, which can create maintenance problems.
So, without further ado, here is the solution now included in Rails. You simple create a file at db/seeds.rb and place ActiveRecord create calls in the file. Here’s an example seeds.rb. [click to continue…]
About a month ago, I wrote about the splitting up of the dynamic duo—Jason Seifer and Gregg Pollack—that made up the Rails Envy team. Since then, we’ve seen 7 episodes of Ruby5 and 2 episodes of Rails Envy come out. Now that we’ve gotten a good feel for what each is doing with his podcast, I thought I’d follow up on what I think of the two podcasts.