Today I would like to introduce a new option for Create, Delete and Update Action named ‘refresh_list’. The purpose is to refresh the whole list after corresponding action, which might be quite useful, especially if action has also side effects on sibling records.

In addition records are inserted according to current sorting after update/create operations. However, disadvantages are higher server load and that you may not see inserted/updated records in result view.

Configuration is fairly easy. Let s change my famous players controller to activate this new feature:

class PlayersController < ApplicationController
  active_scaffold :player do |conf|
    ....
    conf.create.refresh_list = true
    conf.update.refresh_list = true 
    conf.delete.refresh_list = true 
    ....
  end
end

If you would like to enable it for all controllers, you may do the following:

class ApplicationController
  ActiveScaffold.set_defaults do |conf|
    conf.create.refresh_list = true
  end 
end