Sha256: 85f84e0dbe58bd2c4b0cdb7cb062165d490b8329dc87faa059e2e7eac6956d89
Contents?: true
Size: 603 Bytes
Versions: 30
Compression:
Stored size: 603 Bytes
Contents
module Spree module Admin class ZonesController < ResourceController before_action :load_data, except: :index def new @zone.zone_members.build end protected def collection params[:q] ||= {} params[:q][:s] ||= "ascend_by_name" @search = super.ransack(params[:q]) @zones = @search.result.page(params[:page]).per(params[:per_page]) end def load_data @countries = Country.order(:name) @states = State.order(:name) @zones = Zone.order(:name) end end end end
Version data entries
30 entries across 30 versions & 2 rubygems