Blogspot - railsruby.blogspot.com - Ruby on Rails

Latest News:

Rails Tutorials 17 Aug 2008 | 03:25 pm

Here are a few beginner tutorial about Ruby on Rails: has_many :through tutorial by byrnejb: "What I want to do is have three tables: movies, dancers and their join table that I called dancer_movies....

Back to Ruby 17 Aug 2008 | 03:07 pm

My apologies to readers of this blog for not posting on this blog for more than a year. Since June 2006, I was working for the 13th largest website in the world (based on traffic) with more than 4 bil...

Displaying a Textarea field 6 Dec 2006 | 02:37 pm

Use the following in your views to add a text area control.

Displaying a DATE TIME field 6 Dec 2006 | 02:31 pm

If your column is defined to be DATETIME, then you can use the datetime_select method to display the date/time control. The default date and time values for this control can be specified. See setting...

Untitled 8 Oct 2006 | 08:43 am

I wanted to allow a user to type in the address for their community and then instantly inform them whether the address they wanted was available. In my controller: In my view: and in my form In th...

LIKE as a condition to get records. 22 Aug 2006 | 08:14 am

Here's a handy tip for Rails beginners: When you need to find records based on a condition that involves the use of LIKE '%value%' (it's going to be very slow since MySQL won't use an index for this q...

Starting Webrick on a different port 22 Aug 2006 | 08:11 am

Often you may need to start webrick on a different port. Luckily, you can do so using the -p options. For more help options use the --help option:

ActiveRecord::Subclass Not found 7 Aug 2006 | 02:20 pm

If you ever get the following error:

Comparison of String with Integer failed 30 Jul 2006 | 06:40 am

If you have code like @category_id=get_id_from_permalink(@params[:permalink_id]); if @category_id >=1 .... end then you will get the following error: comparison of String with 1 failed To fix the ...

Custom URLs with routes.rb 30 Jul 2006 | 05:40 am

Using the routes.rb file, we can create custom URLs. It is important to note that the following is valid : map.connect ':permalink', :action=>'list', :controller=>'categories' whereas the following ...

Recently parsed news:

Recent searches: