Sha256: 2fe24baa9ed582c965c83eb21f183add97ce6fab28ad513ff3cafda5834804d4

Contents?: true

Size: 636 Bytes

Versions: 104

Compression:

Stored size: 636 Bytes

Contents

require_dependency "educode_sales/application_controller"

module EducodeSales
  class LogsController < ApplicationController
    def index
      respond_to do |format|
        format.html do
        end
        format.json do
          @logs = Impression.where(impressionable_type: "EducodeSales::Staff")
          if params[:sort].present? && params[:sort][:field]
            @logs = @logs.order("#{params[:sort][:field]} #{params[:sort][:order]}")
          else
            @logs = @logs.order("created_at desc")
          end
          @logs = @logs.page(params[:page]).per(params[:limit])
        end
      end
    end
  end
end

Version data entries

104 entries across 104 versions & 1 rubygems

Version Path
educode_sales-0.9.95 app/controllers/educode_sales/logs_controller.rb
educode_sales-0.9.94 app/controllers/educode_sales/logs_controller.rb
educode_sales-0.9.93 app/controllers/educode_sales/logs_controller.rb
educode_sales-0.9.92 app/controllers/educode_sales/logs_controller.rb
educode_sales-0.9.91 app/controllers/educode_sales/logs_controller.rb
educode_sales-0.9.90 app/controllers/educode_sales/logs_controller.rb
educode_sales-0.9.89 app/controllers/educode_sales/logs_controller.rb
educode_sales-0.9.86 app/controllers/educode_sales/logs_controller.rb
educode_sales-0.9.84 app/controllers/educode_sales/logs_controller.rb
educode_sales-0.9.83 app/controllers/educode_sales/logs_controller.rb
educode_sales-0.9.82 app/controllers/educode_sales/logs_controller.rb
educode_sales-0.9.81 app/controllers/educode_sales/logs_controller.rb
educode_sales-0.9.80 app/controllers/educode_sales/logs_controller.rb
educode_sales-0.9.79 app/controllers/educode_sales/logs_controller.rb
educode_sales-0.9.78 app/controllers/educode_sales/logs_controller.rb
educode_sales-0.9.77 app/controllers/educode_sales/logs_controller.rb
educode_sales-0.9.76 app/controllers/educode_sales/logs_controller.rb
educode_sales-0.9.75 app/controllers/educode_sales/logs_controller.rb
educode_sales-0.9.74 app/controllers/educode_sales/logs_controller.rb
educode_sales-0.9.73 app/controllers/educode_sales/logs_controller.rb