app/controllers/simple_admin/resources_controller.rb in simpleadmin-1.2.6 vs app/controllers/simple_admin/resources_controller.rb in simpleadmin-1.2.7

- old
+ new

@@ -26,9 +26,13 @@ resource = model_klass.find_by(params[:column_name] => params[:column_value]).attributes.slice(*model_fields) render json: resource end + def show_total + render json: model_klass.count + end + def create resource = model_klass.new(resource_params) if resource.save render json: resource