Q:

Ruby on Rails convert javascript to coffee

What's a good way to learn how to convert javascript to coffeescript? 
I'm adding Fullcalendar to my RoR app.   The following code is from one of the Fullcalendar demos. 
            select: function(start, end, allDay) {
            var title = prompt('Event Title:');
            if (title) {
                calendar.fullCalendar('renderEvent',
                    {
                        title: title,
                        start: start,
                        end: end,
                        allDay: allDay
                    },
                    true // make the event "stick"
                );
            }
            calendar.fullCalendar('unselect');
        },

I need to learn how to turn that code into coffeescript. 
Thanks! 

A:

The CoffeeScript page has a good comparison. 
In rails you can append .coffee to your javascript filename and sprockets will then compile the CoffeeScript into javascript. 
It should look something like this:
        select: (start, end, allDay) ->
        title = prompt 'Event Title:'
        if title
            calendar.fullCalendar 'renderEvent',
              title: title,
              start: start,
              end: end,
              allDay: allDay,
            true
        calendar.fullCalendar 'unselect'

