Sha256: f6fa11f735c2c5c49db82b9a30d4735c3cc4ef60fa9be51c89fc04d704a0ef22

Contents?: true

Size: 517 Bytes

Versions: 28

Compression:

Stored size: 517 Bytes

Contents

module Workarea
  class Storefront::RecentViewsController < Storefront::ApplicationController
    skip_before_action :verify_authenticity_token

    def show
      if stale?(etag: current_metrics, last_modified: current_metrics.updated_at)
        @recent_views = Storefront::UserActivityViewModel.new(current_metrics, view_model_options)
        render params[:view].in?(allowed_alt_views) ? params[:view] : :show
      end
    end

    private

    def allowed_alt_views
      ['aside', 'narrow']
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
workarea-storefront-3.5.27 app/controllers/workarea/storefront/recent_views_controller.rb
workarea-storefront-3.5.26 app/controllers/workarea/storefront/recent_views_controller.rb
workarea-storefront-3.5.25 app/controllers/workarea/storefront/recent_views_controller.rb
workarea-storefront-3.5.23 app/controllers/workarea/storefront/recent_views_controller.rb
workarea-storefront-3.5.22 app/controllers/workarea/storefront/recent_views_controller.rb
workarea-storefront-3.5.21 app/controllers/workarea/storefront/recent_views_controller.rb
workarea-storefront-3.5.20 app/controllers/workarea/storefront/recent_views_controller.rb
workarea-storefront-3.5.19 app/controllers/workarea/storefront/recent_views_controller.rb
workarea-storefront-3.5.18 app/controllers/workarea/storefront/recent_views_controller.rb
workarea-storefront-3.5.17 app/controllers/workarea/storefront/recent_views_controller.rb
workarea-storefront-3.5.16 app/controllers/workarea/storefront/recent_views_controller.rb
workarea-storefront-3.5.15 app/controllers/workarea/storefront/recent_views_controller.rb
workarea-storefront-3.5.14 app/controllers/workarea/storefront/recent_views_controller.rb
workarea-storefront-3.5.13 app/controllers/workarea/storefront/recent_views_controller.rb
workarea-storefront-3.5.12 app/controllers/workarea/storefront/recent_views_controller.rb
workarea-storefront-3.5.11 app/controllers/workarea/storefront/recent_views_controller.rb
workarea-storefront-3.5.10 app/controllers/workarea/storefront/recent_views_controller.rb
workarea-storefront-3.5.9 app/controllers/workarea/storefront/recent_views_controller.rb
workarea-storefront-3.5.8 app/controllers/workarea/storefront/recent_views_controller.rb
workarea-storefront-3.5.7 app/controllers/workarea/storefront/recent_views_controller.rb