Sha256: 9ad5b35306bb47d95ee19276d8ffd23f3e72bb3168ca6bd878cf866dc14a3a01
Contents?: true
Size: 556 Bytes
Versions: 10
Compression:
Stored size: 556 Bytes
Contents
class Admin::ZonesController < Admin::ResourceController before_filter :load_data, :except => [:index] def new @zone.zone_members.build respond_with(@zone) end protected def collection params[:search] ||= {} params[:search][:meta_sort] ||= "ascend_by_name" @search = super.metasearch(params[:search]) @zones = @search.relation.page(params[:page]).per(Spree::Config[:orders_per_page]) end def load_data @countries = Country.order(:name) @states = State.order(:name) @zones = Zone.order(:name) end end
Version data entries
10 entries across 10 versions & 1 rubygems