While generating RESTful routes in rails, it is easy to get carried away and generate many levels of nested resources for every level of has_many associations. For instance, I recently wrote something like this in my routes file:
# in config/routes.rb
map.resources :first_resources do |first|
first.resources :second_resources do |second|
[...]
I’ve just been setting up Ubuntu as a virtual OS in my Windows machine using Sun Virtualbox. I did run into a couple of problems initially, so I’m listing out the steps involved in acse somebody else needs some help with the same.
Downlaod Virtualbox from here and install it. You will obviously need Ubuntu as [...]
I had to move an SVN repository for one of my projects from one hosting account to another today. I don’t know much about handling SVN and it took me a bit of searching before I was able to do it, so i’ve written the steps here for anyone else who might be in the [...]
Just a couple of weeks into being a rails developer, I made the one really, really, really big blunder — I used a find_by_sql in a search page. (Oh, please… stop booing. I was a newbie then.) Now, I’ve realized that I might have to modify the search to add yet another column, and well… [...]
Recently I was trying to find ways to import data from excel spreadsheets into the database in a rails project. We needed to save the data from the client’s excel file into the database. Here’s how it can be done using a rake task.
The file will have to be in CSV format, so you’ll have [...]
Create a simple countdown timer using javascript and HTML that counts down to an event. This example used in this tutorial counts down to the FIFA world cup 2010.
For a few days now, I’ve been working on a wordpress based website where I have to edit quite a few files directly on the server. I used wordpress’ theme and plugin editors for the first day, but it soon became too difficult to edit the files that way and I had to look for [...]
jQuery allows you to easily create a datepicker and customize it according to your requirements. Here’s a quick look at how you can get started with using the jQuery datepicker.
The jQuery website has a nice application called Themeroller that lets you customize the interface for jQuery UI widgets. There are also plenty of themes available [...]