Antonio Cangiano has a good review of some rails hosting packages at http://www.antoniocangiano.com/articles/2006/01/01/rails-hosting

Some examples of Rails applications
A visitor to Ruby Zone asked in a comment about my post "Rails is cool":
I was wondering how you could accomplish this with a different controller. For ex:
in the users view I have:
<%= text_field_with_auto_complete :state, :name %>

where would I put the controller code, in the user or state controller. so far both havent worked for me. Thanks


Here is a step by step how I do it:

» Read More

Blaine Kendall has compiled from numerous sources a handbook (PDF format: 105K) that covers all you need to know. The PDF file contains 14 pages 25 tips.

I’ve been studying Ruby On Rails over the past few weeks and taking notes as I go. This is a result of my amassed noteset from reading books, tutorials and websites. I also find writing notes helps you to remember so this was also a memorization exercise for myself.

» Read More

The script.aculo.us has some cool demos of the Ruby on Rails AJAX helpers, which use drag-and-drop and autocompletion features.

What makes Rails great is that with 2 lines of code you get a full application, in our case a cool text input box with autocompetion. Here is the basic example at script.aculo.us:

# view
<%= text_field_with_auto_complete :contact, :name %>

# controller
auto_complete_for :contact, :name

» Read More

I came across this question in "Rails Weenie" site and because there is no good answer for it there, here is my 2cents:

I have an application that will have multi-language views spanish, english, etc. What i want to do is the next thing, on the views folder i want to create a folder named “spanish”, another one named “english”, etc. These folders will contain all the rhtml files of each language. But, the problem is...

When i want to acces the main page i will be redirected to the view of the language selected. For example, in PHP i will do something like this:

$language=”spanish”;
$url_to_show=”$language/index.php”;


On rails i have a controller with a function named index, and it shows the view “index.rhtml”... but i want to show the index.rhtml that is inside of the selected language folder

Is it possible?

Yes it is. And exactly the way you described with php:

» Read More

Wade Winningham in his article tries to answer "Questions Ruby on Rails skeptics ask"
If you decide to recommend using Rails with a team that doesn’t know much about it, you may run into some questions. If you don’t have some ready answers, the idea will most likely be shot down quickly and left in the dust.

The questions he tries to answer are:

  • Using ‘id’ as the primary key name ?

  • Using the Rails naming scheme ?

  • Rails generates too much database server traffic ?

  • It’s difficult to find hosting ?

  • What about performance ?

» Read More

I found the tip "Alternative Default Routes" from "Rails Code Snippets" very helpful. I wanted to customize the look of URLs in a Rails application and this helped me although it wasn't exactly what I wanted.

» Read More

IndexedSearchEngine is a simple, pluggable engine for rails applications which can be used to enable full text indexed searches within an application.

The author of the Engine says that Ferret (a port of the Apache-Lucene java project and one of the most requested libraries for ruby) is almost certainly faster but he believes that IndexedSearchEngine is easier to use, however.

» Read More

David in his post: Street Easy: Look at all the New York places you can't afford! in the RubyOnRail Weblog say:
Street Easy is a sweet new mash-up of Google Maps that’s running Ruby on Rails to mock you for all the places in New York you can’t afford to buy.

» Read More

Rails has a Prototype JavaScript library built in which contains all kind of Ajax and DOM manipulation javascript-objects and a Ruby module (JavascriptHelper) that wraps access to this JavaScript library.

To call functions from the Javascript Helper you have to include the prototype.js (it must be in the application's public/javascripts folder) in the <head> section of your rhtml page like this:

<%= javascript_include_tag "prototype" %>


Now, to make a basic Ajax call from your rhtml page, you use link_to_remote method which takes 3 parameters: The text of the link, the Id of the HTML element to update and the Url of the action to call.

<%= link_to_remote(
    "Say Hello Word",
    :update => 'main',
    :url => { :action => :print_hello }) %>

<div id="main">This is some text...</div>

» Read More

15 months after the first public release, Rails has arrived at the big 1.0 yesterday.

David the creator of Rails said in the RubyOnRails Weblog:
Rails 1.0 is mostly about making all the work we’ve been doing solid. So it’s not packed with new features over 0.14.x, but has spit, polish, and long nights applied to iron out kinks and ensure that it works mostly right, most of the time, for most of the people. Yes, we still have pending tickets, but we will always have pending tickets. If I had accepted that fact back in February, we would probably have been at 2.0 now ;).

» Read More