I use super inplace control plugin for editing there in place.

when I run this application,
sorting problem occurs
For example
   There are two records in my db it shows the list
    Name
      argentina
      alaska

I click argentina and changed to washington , then I refresh the page
(F5 or press reload icon)
the list show as,
        Name
        alaska
        washington

   Again I click the alaska,here the textfield contains washington but
really it wants to show alaska so i don't know what's wrong here...

I used SuperInplace Controls  plugin I got the problem during refresh
the page.

    ######## My controller code
      class AreasController < ApplicationController
        in_place_edit_for :area,:name
       def index
           @areas = Area.find(:all,:order=>"name")
      end

    ############# index.html.erb

    <%= javascript_include_tag :defaults %>
<%= stylesheet_link_tag "main",  "in_place_styles"  %>
<h1>Listing areas</h1>

<table border="2">
  <tr>
  </tr>
<%= inplace_error_div %>
<% for area in @areas %>
  <tr>
  <%...@area=nil%>
    <td> <% @area = area %>
<%=
in_place_text_field :area, :name 
,:script=>true,:external_control=>'edit_name'%></
td>
    <td><%= link_to 'Show', area %></td>
    <td><%= link_to 'Edit', edit_area_path(area) %></td>
    <td><%= link_to 'Destroy', area, :confirm => 'Are you
sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New area', new_area_path %>

Please give me an idea, I have using rails 2.2.2

--

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=.


Reply via email to