In rails 3.1, I implement as:  

1. Define test action in post controller:

```
def test
    @p = Post.first
    respond_to do |format|
      format.js
    end
end

```

2. Define in routes.rb:

```
resources :posts do
  collection do
    get 'test'
  end
end

```

3. In index.html.erb of post folder, I add link:

```
<%= link_to "test", test_post_path, :remote => true %>

```

4. Create test.js.erb file in post folder:

```
code jQuery

```

My question is: "Is my implement Ajax in rails 3.1?" I don't really understand about ajax in rails.  

If no, can you give me a link about ajax in rails 3.1 and the technique I set up, what is it?