Sha256: 066732ce5c4ca86f1e771e8eea2e96523cd1a0919f8db09f041efff2688a2862

Contents?: true

Size: 756 Bytes

Versions: 5

Compression:

Stored size: 756 Bytes

Contents

class Spree::BaseController < ApplicationController

  filter_parameter_logging "password"

  # retrieve the order_id from the session and then load from the database (or return a new order if no 
  # such id exists in the session)
  def find_order      
    unless session[:order_id].blank?
      @order = Order.find_or_create_by_id(session[:order_id])
    else      
      @order = Order.create
    end
    session[:order_id] = @order.id
    @order
  end
    
  def access_forbidden
    render :text => 'Access Forbidden', :layout => true, :status => 401
  end
  
  # Used for pages which need to render certain partials in the middle
  # of a view. Ex. Extra user form fields
  def initialize_extension_partials
    @extension_partials = []
  end
  
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
spree-0.4.0 app/controllers/spree/base_controller.rb
spree-0.4.1 app/controllers/spree/base_controller.rb
spree-0.5.0 app/controllers/spree/base_controller.rb
spree-0.5.1 app/controllers/spree/base_controller.rb
spree-0.6.0 app/controllers/spree/base_controller.rb