I have a view that has a
easiest option:
put the whole table (or table row depending on your needs) into a
partial and then replace the table (or rows) with a new instance of
the partial.
there are various ways to trigger an ajax request - again, this
depends on your needs
checkout:
link_to_remote:
http://api.rubyonrails.org/classes/ActionView/Helpers/PrototypeHelper.html#M001930
observe_field:
http://api.rubyonrails.org/classes/ActionView/Helpers/PrototypeHelper.html#M001939
observe_form:
http://api.rubyonrails.org/classes/ActionView/Helpers/PrototypeHelper.html#M001940
If the controller action deals with more than one format (eg. html and
js) then you should use the respond_to method.
Otherwise,
def my_ajax_action
@content = # new content for your table
replace “id_of_table”, render(:partial => “partial_name”, :locals
=> {:content => @content } )
end
Hope that helps?
Gavin