def index
      if params[:terms]
        # For search mode
        @dashboard_templates = []
        JSON.parse(params[:terms]).map { |t| @dashboard_templates = @dashboard_templates | dashboard_templates.where(Hash[*t]) }
        response.headers['X-Total-Count'] = @dashboards_templates.count
      else
        @dashboard_templates = dashboard_templates
        @dashboard_templates = @dashboard_templates.limit(params[:limit]) if params[:limit]
        @dashboard_templates = @dashboard_templates.skip(params[:offset]) if params[:offset]
        @dashboard_templates = @dashboard_templates.order_by(params[:order_by]) if params[:order_by]
        @dashboard_templates = @dashboard_templates.where(params[:where]) if params[:where]
        @dashboard_templates = @dashboard_templates.all.fetch
        response.headers['X-Total-Count'] = @dashboard_templates.metadata[:pagination][:count]
      end
    end
def index
      if params[:terms]
        # For search mode
        @dashboard_templates = []
        JSON.parse(params[:terms]).map { |t| @dashboard_templates = @dashboard_templates | dashboard_templates.where(Hash[*t]) }
        response.headers['X-Total-Count'] = @dashboards_templates.count
      else
        @dashboard_templates = dashboard_templates
        @dashboard_templates = @dashboard_templates.limit(params[:limit]) if params[:limit]
        @dashboard_templates = @dashboard_templates.skip(params[:offset]) if params[:offset]
        @dashboard_templates = @dashboard_templates.order_by(params[:order_by]) if params[:order_by]
        @dashboard_templates = @dashboard_templates.where(params[:where]) if params[:where]
        @dashboard_templates = @dashboard_templates.all.fetch
        response.headers['X-Total-Count'] = @dashboard_templates.metadata[:pagination][:count]
      end
    end
==================================================================
 Instance methods
==================================================================
 GET /mnoe/jpi/v1/admin/impac/dashboard_templates