more info

Media72 Hosting Articles and Tips

Archive for December, 2007

Flexible Fixtures in Rails 2

Wednesday, December 12th, 2007

As Matt Magain pointed out yesterday, Rails 2.0 is now gold! Not a lot has changed feature wise from the PR (makes sense - features were frozen at that point), although it seems that the new improvements to fixtures managed to slip in to the final version.

Rather than having to map foreign keys in your fixtures using id numbers, you can use fixture names, which makes life a whole lot easier. So you can now write:

users.yml

joe_blogs:
  id: 1
  first_name: Joe
  last_name: Blogs
mary_smith:
  id: 2
  first_name: Mary
  last_name: Smith


websites.yml

website_1
  id: 1
  user: joe_blogs
  url: "http://www.joeblogs.com"

website_2
  id: 2
  user: mary_smith
  url: "http://mary.smith.id.au"

which obviously makes a lot more sense to a human reading it, especially when you have a large number of fixtures across many models.

Let me join Matt in congratulating the Rails core dev team for achieving this milestone - roll on Rails 3!

This article provided by sitepoint.com.


10 Ruby On Rails Plugins You Should Be Using

Sunday, December 9th, 2007

One of Ruby on Rails strengths is how easy it is to extend with Ruby Gems and plugins, becuase you don’t have to code everything yourself you can save a lot of time. One problem facing Rails codes is knowing what plugins are out there and how to use them. The following is a list of 10 plugins that should make your coding life much easier and save you a fair bit of time.
(more…)

Upgrading to Rails 2.0 how to

Sunday, December 9th, 2007

Ben Smith has written some Rails 2 upgrade notes which cover the process of upgrading and existing application to Rails 2.0. Included in the article is a rake task for checking depreciation warnings before you upgrade which is very useful.

Rails 2.0 causing startup errors for some customers

Saturday, December 8th, 2007

After upgrading our servers to Rails 2.0 it has come to our attention this has caused problems for some customers rails applications where the application will fail to start. This will happen when your application is not set to use a specific version of rails and will therefor load the most recent version of rails. On servers where customers have been affected we have removed rails 2.0. This is a temporary measure to give customers time to upgrade their applications. We will be reinstalling rails 2.0 on all servers on Friday 14th December. Read on to see how to make sure your rails application will still work after the upgrade.
(more…)

Ruby on Rails 2.0 released and installed on all servers

Friday, December 7th, 2007

Thats right folks, today is a big day for Rails and marks the release of version 2.0. For a full run down see DHH’s post on the the Ruby on Rails site. We have already upgraded all of our servers to include Rails 2.0.1 so that you guys can get your teeth into it straight away. Sign up with any one of our rails accounts and get instant access to Rails 2.0.
(more…)

 

hedges