Archive: December 2005

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