Archive for August, 2007

How to load selective fixtures to db in rails

loading fixture to db require

rake db:fixtures:load 

To load a subset of your fixtures to your projects db

rake db:fixtures:load FIXTURES=users,stores

August 30, 2007 at 6:08 pm Leave a comment

Star rating in ruby on rails

Recently I needed to implement star rating system for one of my project I am working on.

If you are not familiar with a star rating system, its simply a method of voting using (usually) 5 stars in a row, which will change colour as you hover over them indicating the level at which to rate something. You may think a simple rollover would accomplish this but difficulty arises because as you rollover each star it should stay highlighted while you light up the next one and so on until the end of the row of stars.


Install the acts_as_rateable plugin.

Run the following from the root of your Rails app to install the plugin

script/plugin install


You can original post at http//

August 30, 2007 at 6:03 pm Leave a comment

How to Paginate With Ajax

Pagination is a very common task in web application development. But sometimes we need to paginate something with ajax request. The interest to use Ajax for this is to provide a dynamic interface which doesn’t need to reload the entire page when next results(page) displayed. Ajax is really nicely integrated with Rails, and using it is very easier with this great framework. To work with ajax requests your browser must be enabled to handled java script requests. I knew two methods for that problem.

This is posted on satish’s blog

For more details click here

August 8, 2007 at 10:05 am Leave a comment


August 2007
« Jul    

Posts by Month

Posts by Category