Sha256: ca2bcfaa732d702208808107f3f3d4f8143a9fceed02454162f50a638fc7d3a2

Contents?: true

Size: 430 Bytes

Versions: 3

Compression:

Stored size: 430 Bytes

Contents

module SimpleAdminHelper
  include SimpleAdmin::Helpers::UrlHelper

  def resources_pagination_start(per_page, current_page)
    (per_page * current_page.to_i) - (per_page - 1)
  end

  def resources_pagination_end(per_page, current_page)
    (per_page * current_page.to_i) + 1
  end

  def resource_index_path(resource_name, prefix=:admin_system, postfix=:path)
    public_send("#{prefix}_#{resource_name}_#{postfix}")
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
simple-admin-0.1.2.pre.alpha app/helpers/simple_admin_helper.rb
simple-admin-0.1.1.pre.alpha app/helpers/simple_admin_helper.rb
simple-admin-0.1.0.pre.alpha app/helpers/simple_admin_helper.rb