Sha256: 632b0f83fb7463f4757625e83a007dbfad6e9bcdda46c657a8ebdf2a4725930e

Contents?: true

Size: 507 Bytes

Versions: 7

Compression:

Stored size: 507 Bytes

Contents

class ErpForms::ErpApp::Desktop::DynamicForms::BaseController < ::ErpApp::Desktop::BaseController
  @@datetime_format = "%m/%d/%Y %l:%M%P"
  IGNORED_PARAMS = %w{action controller uuid widget_name widget_action dynamic_form_id dynamic_form_model_id model_name use_dynamic_form authenticity_token file}

  protected  
  def page
    offset = params[:start].to_f
    offset > 0 ? (offset / params[:limit].to_f).to_i + 1 : 1
  end
  
  def per_page
    params[:limit].nil? ? 20 : params[:limit].to_i
  end  
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
erp_forms-3.1.2 app/controllers/erp_forms/erp_app/desktop/dynamic_forms/base_controller.rb
erp_forms-3.1.1 app/controllers/erp_forms/erp_app/desktop/dynamic_forms/base_controller.rb
erp_forms-3.1.0 app/controllers/erp_forms/erp_app/desktop/dynamic_forms/base_controller.rb
erp_forms-3.0.2 app/controllers/erp_forms/erp_app/desktop/dynamic_forms/base_controller.rb
erp_forms-3.0.1 app/controllers/erp_forms/erp_app/desktop/dynamic_forms/base_controller.rb
erp_forms-3.0.0 app/controllers/erp_forms/erp_app/desktop/dynamic_forms/base_controller.rb
erp_forms-2.1.0 app/controllers/erp_forms/erp_app/desktop/dynamic_forms/base_controller.rb