avatar

chuyeow's pings

Sort By:

It’s time again for your weekly dose of what’s new in edge Rails. This weeks’ report covers changes from 14 Jan 2008 to 20 Jan 2008 (the day the Rails Envy podcast was recorded).Route recognition is fasterRails’ route recognition has been optimized and is significantly faster especially for applications using many resources (i.e. via map.resources ...
127 unique reads 0 comments
chuyeow Posted by chuyeow User Menu on January 23, 2008 at redemption in a blog
Hah.
139 unique reads 0 comments
chuyeow Posted by chuyeow User Menu on January 18, 2008 at redemption in a blog
Edge Rails saw a barrage of refinements and enhancements this week and there’s even talk about Rails 2.1 being just a little around the corner. There’s also been a flurry of contributions to making Rails more thread-safe and performance optimizations (all still work in progress at the moment) - it’s really nice to see how ...
121 unique reads 0 comments
chuyeow Posted by chuyeow User Menu on January 16, 2008 at redemption in a blog
I am not certain whether the ability to retry a code block when encountering exceptions was a feature available in Ruby, but I certainly couldn’t find anything on that topic (what I did find were mostly about the retry keyword for iterator loops).Before you ask why I need this, the motivation for this was because ...
132 unique reads 0 comments
chuyeow Posted by chuyeow User Menu on January 14, 2008 at redemption in a blog
It’s about 9 days too late, but I figure it’d be fun to just throw these out and see if anyone else enjoyed the same things I did in 2007.PC Game of the YearThis has definitely got to go to Call of Duty 4: Modern Warfare. The single-player campaign was short but visually impressive and ...
116 unique reads 0 comments
chuyeow Posted by chuyeow User Menu on January 9, 2008 at redemption in a blog
Yup, it’s time for your weekly dose of the changes on edge Rails, more or less covered in the forthcoming Rails Envy podcast. Using edge Rails is neither arcane nor terrifying, and hopefully weekly reports like these will allow you to take control of your own release schedule with your Rails apps.This week’s report covers ...
chuyeow Posted by chuyeow User Menu on January 9, 2008 at redemption in a blog
Yes, it’s a plug for myself and it’s shameless:Whatever Zed Shaw may say about Rails, Rails has done a huge part in making web development fun again for jaded web developers (first-time web developers probably won’t be able to tell the difference), and more importantly, raising the profile of Ruby more than any other Ruby ...
chuyeow Posted by chuyeow User Menu on January 3, 2008 at redemption in a blog
Gregg Pollack of Rails Envy (the guys behind your favorite Ruby on Rails vs everything commercials) asked me recently whether I could provide them with weekly updates of changes on edge Rails for the Rails Envy Podcast (which is often hilarious besides being informative), seeing as I am already keeping up with developments on the ...
127 unique reads 0 comments
chuyeow Posted by chuyeow User Menu on January 2, 2008 at redemption in a blog
Prior to the introduction of nested example groups in RSpec, I’d always felt that descriptions got a little unwieldy when trying to describe the different cases and disliked specifying the controller_name repeatedly. For example (and these are real examples from real projects at work, with actual code removed for conciseness):describe 'POST HotelDealsController#create …
170 unique reads 0 comments
chuyeow Posted by chuyeow User Menu on December 30, 2007 at redemption in a blog
That’s right, Don’t Repeat Yourself in your functional and ActionMailer tests. If you’re a Test::Unit user, this will probably look familiar to you when writing Rails functional tests (for your controllers):class PostsControllerTest < Test::Unit::TestCase def setup @controller = PostsController.new @request = ActionController::TestRequest.new …
110 unique reads 0 comments
chuyeow Posted by chuyeow User Menu on December 27, 2007 at redemption in a blog
Just in the nick of time for the Christmas target, the Ruby core team has released Ruby 1.9.0 - Matz announced the release on the ruby-talk mailing list not too long ago.Rubygem and Ruby library developers, now’s the time to get down to making your Ruby code compatible with 1.9.0.Rails is not too far from ...
102 unique reads 0 comments
chuyeow Posted by chuyeow User Menu on December 26, 2007 at redemption in a blog
You’d may not have noticed this yet, but Rails 2.0 has a new convenient syntax for generating ActiveRecord migrations. Go ahead, run the migration generator with script/generate migration. I’ll wait.Yup, you can now specify the columns you want to add in your migration by passing attribute/type pairs to the migration generator. Ergo,script/generate migration …
chuyeow Posted by chuyeow User Menu on December 24, 2007 at redemption in a blog
In case anyone is wondering about the pause in Rails 2.0 - a feature a day posts, yes, I know, I’ve not been writing any posts for a week or so. I’ll be posting more actively again from tomorrow - just taking a short break due to general lethargy these few days. And submitting patches ...
chuyeow Posted by chuyeow User Menu on December 23, 2007 at redemption in a blog
Rails 2.0.2 was tagged not too long ago and will hit the gem servers soon I expect. Being a minor point release there aren’t many changes, but here’re the ones I feel are worth mentioning:ActionPack changesConfigurable asset hosts: You can now pass a proc to ActionController::Base.asset_host. This allows you to get by the hard-coded assumption ...
138 unique reads 0 comments
chuyeow Posted by chuyeow User Menu on December 17, 2007 at redemption in a blog
Doing GROUP BYs in ActiveRecord has always been tricky. There’s a lot of “magic” in ActiveRecord and room for untested edge cases. Thankfully, Rails also has a squadron of eagle-eyed contributors who are on hand to fix unforeseen errors.For example, if you wanted to do this:class Click < ActiveRecord::Base belongs_to :site # site_id ...
chuyeow Posted by chuyeow User Menu on December 16, 2007 at redemption in a blog
Today’s (un)feature covers the oft-abused and misunderstood with_scope method. The excellent err.the_blog had a post on how you should be using with_scope (yes, only use it in your ActiveRecord models, not in your controllers or filters). Yes that blog post may have been written a long time back but it’s still applicable to Rails 2.0.With ...
chuyeow Posted by chuyeow User Menu on December 16, 2007 at redemption in a blog
I don’t think I need to explain how concatenating your 5 stylesheets and 12 JavaScript files into single files each makes your webpages load faster. Unless you’re using multiple asset hosts (Rails 2 allows for multiple asset hosts), then it becomes tricky to say for sure which method is better, but I digress.There’re a bunch ...
chuyeow Posted by chuyeow User Menu on December 12, 2007 at redemption in a blog
Google Chart API looks quite useful. I’ve used Gruff to generate graphs before but this looks way easier (and much lighter on the server without all that ImageMagick magic!) I’ll have to play with it someday - if only I didn’t have to mess with those URL params!Well, Deepak Jois from singapore.rb (the local Ruby ...
chuyeow Posted by chuyeow User Menu on December 12, 2007 at redemption in a blog
I know I said I was going to try and keep the features in “a feature a day” to those not mentioned in popular places, but this feature is one of the few nicest features in Rails made by a contributor outside of the Rails core so I couldn’t resist mentioning it.First, an exampleclass CommentsController ...
chuyeow Posted by chuyeow User Menu on December 10, 2007 at redemption in a blog
Time#advance and DateTime#advance just got, erm, more betterer in Rails 2.0.In Rails 1.2.6 and earlier, Time#advance and DateTime#advance only accepted :year, :month and :day options. You’d think :hours, :minutes and :seconds would work too but due to a bug in the code (see ticket #9818), you get something like this instead:Time.utc(2000,10,1,10,30,45).advance(:days …
chuyeow Posted by chuyeow User Menu on December 9, 2007 at redemption in a blog

The Community Meta Blog
for Singapore Bloggers
v2.1.0

Join Singapore Blog Awards 2012

Bloggers: Singapore Blog Awards 2012
is now acceping nominations!

 

latest comments rss feed

 
 

shouts rss feed for latest shouts history

avatar hexsarash: hai....
avatar aieza: siang all
avatar 88henry: morning every1
avatar felizaong: SHOES SHOPPING! Me wearing it>> www.ping.sg/read/Shopping-Aldo-Wedges
avatar nawwaf: salam semua.. heyyy
avatar hexsarash: khukhukhu...
avatar sl417k: hai
avatar birthmark: A small bit of China.
avatar bloggerindonesia: Penyebab Ketidakseimbangan Neraca Saldo
avatar mingisland: www.bigmouth8.com
avatar coolinsights: Why You Need to Start Journalling and Blogging ping.sg/item/The-Benefits-of-Journalling-and-Blogging
avatar sevra: ^_^
avatar hexsarash: halo all...^_^
avatar bloggerindonesia: Proses Pembuatan Neraca Saldo
avatar hariagsutomo: tes...tes...
avatar grandong: pagi semua...
avatar w_delon: isilo
avatar blue8118: Is Coconut one of Miss Earth Sabah Finalists?
avatar hexsarash: huahem....
 

new users

hongxingpeggy dingqian101212 kamipenjajah dipaali70 hpilitysg irgimnur andi_11