August 17th, 2010 – 12:30 PM
Previously, in rails 2.3.8 i used the prototype-helpers link_to_remote and form_remote_for (amongst others).
These had the option to add callbacks as follows:
link_to_remote "Add to cart",
:url => { :action => "add", :id => product.id },
:update => { :success => "cart", [...]
August 17th, 2010 – 09:00 AM
I have created a Rails3 application, started with Haml/Sass and finding it awesome. I am also trying to do unobtrusive javascript.
Before, in Rails 2.3, I would have expected a remote-form to have an :update attribute, where you could specify a selector where the response of the remote method would be rendered.
Now it needs to be [...]
August 13th, 2010 – 09:47 AM
With Rails3 i can create a project fully cut to my needs. I will write it down here, just so i remember it well and hopefully it will help some of you too.
In my projects, i want to use haml, rspec2, factory-girl, jquery, …
We need a few steps to complete this.
Create the project
For starters, create [...]
March 9th, 2010 – 11:42 AM
In my Rails application i use a generic application.rhtml for all my pages. Amongst others, this code contains some jQuery code to manipulate my page
var $j = jQuery.noConflict()
$j(document).ready(function() {
// remove all alt-tags
$j("[alt]").removeAttr("alt");
[...]
March 4th, 2010 – 11:42 AM
I am using the jQuery validate plugin which is awesome for straightforward form validation. What i especially like is that it offers the user a better user experience, because there is no need for the round-trip to the server.
I still need to do the validation on the server-side (rails) as well. I guess there should [...]