(Rails) Editing attributes in place using the index page

I want to use the "in_place_editor_field" on the index page of the elements. Basically, I want to emulate spreadsheet functions for pre-existing line items in order to edit their attributes. However, not one of the in_place_editor examples that I have seen provides any useful real application of this kind.

In addition, many existing code examples do not work. I know that the code has been removed from Core, but even after installing it as a plugin, it does nothing.

Any ideas?

Best.

+3
source share
2 answers

. http://docs.activestate.com/komodo/5.0/tutorial/railstut.html index.html.erb.

, in_place_editor_field , .

+1

, :

<table>
    <tr>   
        <th>First name</th>   
        <th>Last name</th> 
    </tr>  
    <% @person.each do |person| %>
        <tr>  
            <td><%= best_in_place person, :first_name %></td>  
            <td><%= best_in_place person, :last_name %></td>
        </tr>
    <% end %>
</table>

0

Source: https://habr.com/ru/post/1714828/


All Articles