Generated rjs replaces web page

I am running Rails 3.0.7 with Ruby 1.9.2 and using jquery. I ran

$ rails generate jquery:install

to get the right javascript files for AJAX.

HTML:
<%= javascript_include_tag :all %>

I don't have the time, but <%= link_to( "click here", :action=> 'say_when', :remote => true, :format => :js ) %> and I will look it up.

say_when.js.rjs:
page.replace :time_div, “

The time is #{DateTime.now.to_s} </
p>”

When I click on the link, instead of replacing the div html, the
entire page is replaced with the generated javascript:

try {
Element.replace(“time_div”, "

The time is
2012-04-11T16:43:23-04:00

");
} catch (e) { alert(‘RJS error:\n\n’ + e.toString());
alert(‘Element.replace(“time_div”, "

The time is
2012-04-11T16:43:23-04:00

");’); throw e }

page.replace_html does the same thing.

What am I doing wrong?

Solved my own problem. The link_to should be:

<%= link_to( “click here”, {:action=> ‘say_when’, :format
=> :js}, :remote => true, :method => :post ) %>

I also had to replace say_when.js.rjs with

say_when.js.erb:
$(’#time_div’).html(‘

The time is <%= DateTime.now.to_s %> </
p>’)