Sha256: f0db172c19c4c820649e163e24214e64ab75e534abe0f59a646d71d61b7151c3
Contents?: true
Size: 601 Bytes
Versions: 15
Compression:
Stored size: 601 Bytes
Contents
module Spree module Admin class ZonesController < ResourceController before_action :load_data, except: :index def new @zone.zone_members.build end private 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
15 entries across 15 versions & 1 rubygems