Hello, I'm in troubles with an easy thing I've done several times, but
I don't see what I'm doign wrong.

Having index.html.erb:

<h1>Projects</h1>

<div id="new_project">
</div>
<table>
  <tr>
  </tr>

<% for project in @projects %>
  <tr>
    <td><%= project.name %></td>
    <td><%= project.description %></td>
    <td><%= link_to 'Show', project %></td>
    <td><%= link_to 'Edit', edit_project_path(project) %></td>
    <td><%= link_to 'Destroy', project, :confirm => 'Are you
sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to_remote 'New project', :url => new_project_path %>

new.rjs:

page.replace_html "new_project", :partial => "new", :object =>
@project

and finally _new.html.erb:

SOME TEXT



When I'm within index.html.erb and click on 'New project' link, I see
this log in the console:

Processing ProjectsController#new (for 127.0.0.1 at 2009-02-16
18:08:12) [GET]
  Parameters:
{"authenticity_token"=>"1efcdedfb3b680581058efa75cdbc143bf880b65"}
  SQL (0.1ms)   SET NAMES 'utf8'
  SQL (0.0ms)   SET SQL_AUTO_IS_NULL=0
  Project Columns (0.7ms)   SHOW FIELDS FROM `projects`
Rendering projects/new
Rendered projects/_new (0.2ms)
Completed in 11ms (View: 2, DB: 1) | 200 OK [http://localhost/projects/
new?authenticity_token=1efcdedfb3b680581058efa75cdbc143bf880b65]


but nothing happens, thus is, it doesn't replace the 'new_project'
DIV. What I'm doing wrong, because I can't see it.

Thanks in advance.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to