Class: Spree::Admin::PricesController
Instance Method Summary
collapse
belongs_to, #create, #destroy, #new, #update, #update_positions
#set_user_language_locale_key
Instance Method Details
#edit ⇒ Object
24
25
|
# File 'app/controllers/spree/admin/prices_controller.rb', line 24
def edit
end
|
#index ⇒ Object
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
# File 'app/controllers/spree/admin/prices_controller.rb', line 8
def index
params[:q] ||= {}
@search = @product.prices.kept.accessible_by(current_ability, :index).ransack(params[:q])
@master_prices = @search.result
.currently_valid
.for_master
.order(:variant_id, :country_iso, :currency)
.page(params[:page]).per(Spree::Config.admin_variants_per_page)
@variant_prices = @search.result
.currently_valid
.for_variant
.order(:variant_id, :country_iso, :currency)
.page(params[:variants_page]).per(Spree::Config.admin_variants_per_page)
end
|