Articles

Understanding this in Javascript object literal

Here is code.

var foo = {

   first: function(){
     console.log('I am first');
   },

   second: function(){
     console.log('I am second');
   },
};

foo.first();
foo.second();

Everything works fine.

Now there is a need for function ‘second’ to call function ‘first’. Try this and it will fail.

What's New in Edge Rails: The Hodgepodgery

It's been quite a while since we've had a new Edge Rails post. I've really missed them and there have been a lot of changes, both big and small, on the Edge in the time since. In this post I'll cover a little bit of everything that's been happening over the past week or so in Rails. Along with this, you should expect to see more frequent and regular updates on all that is currently going on.

USE INDEX with Active Record finders

MySQL doesn’t always pick the right index for your queries. Hence, sometimes you must tell it which index to use. Consider the example :

Does Entrepreneurial Experience Translate to the Corporate World

 Does Entrepreneurial Experience Translate to the Corporate World

IR

Installing AutoTest

I think autotest is one of the best things about developing in Rails. If you don’t know, autotest runs in the background watching all of your application files.

Double Shot #512

HyRes : ActiveResource that actually works!

It's three months on from my original post whinging about the lack of Validations in Active Resource.
At that time I put my money where my mouth was and forked a copy of the HyperactiveResource plugin, which provided a very crude, basic improvement over vanilla Active Resource.

So What have I achieved?

I've actually done a lot since then.

Notes on lean design

I often have conversations about whether or not it is worthwhile to spend extra time improving the aesthetics or the “UI” of a feature. I think that some startup people feel like it is less risky to have an app that is beautiful and that is really easy to use than an app that looks really bare bones and has occasional ui hiccups.

This is not the case.

Let’s look at two teams. One team spends that extra time, the other team doesn’t.

Getting RSpec and TextMate to play nice

TextMate, Rspec and Dot Spec Party __ Elijah Miller - (Build 20090805031252).jpg

What's New in Edge Rails: Cleaner RESTful Controllers w/ respond_with


This feature is schedule for: Rails v3.0

REST is a first-class citizen in the Rails world, though most of the hard work is done at the routing level. The controller stack has some niceties revolving around mime type handling with the respond_to facility but, to date, there’s not been a lot built into actionpack to handle the serving of resources.

Phusion Passenger 2.1.2 packages for Ubuntu | Rails Fire

Phusion Passenger 2.1.2 packages for Ubuntu

Following Friday’s release of Passenger 2.1.2 by the Phusion folks, we’ve updated our Ubuntu packages.  We’ve been testing version 2.1.1 packages for a little while now and they’ve been very stable, supporting both Rails 2.3 and older apps that still depend on Rack 0.4 (such as older Sinatra apps).

The details are on the usual page on our wiki.  If you have any problems or need any help, try our forums.

The new packages depend on new versions of the Ruby rack libraries (not the gem), but this is provided in our repository too and will be automatically installed. You need to install the fastthread gem yourself though.  Our repository provides a few other useful Hardy packages too.

We are only testing our packages against Ubuntu Hardy right now, but they should install and run fine on newer versions of Ubuntu too.

Remember, for maximum memory savings (and speed improvements) try our Ruby Enterprise Edition packages for Ubuntu Hardy (currently only 32bit packages available).

Images: 
  • Operating System:
  • Programming Language: