Sha256: 6a36286ff7bcb2f108200df16ca7e8548c69ba5705726e1a4e65044420b57865
Contents?: true
Size: 502 Bytes
Versions: 1
Compression:
Stored size: 502 Bytes
Contents
module Spree module Account class FavouritesController < Spree::StoreController before_filter :check_logged_in_user def index @user = try_spree_current_user if @user @favourites = Spree::Variant.favourites_by_user(@user).page(params[:page] ||= 1).per(15) else unauthorized end end private def check_logged_in_user redirect_to spree_login_path unless try_spree_current_user end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
spree_my_favourites-2.2.6 | app/controllers/spree/account/favourites_controller.rb |