app/controllers/effective/orders_controller.rb
# Thank you for Purchasing this Order. This is where a successfully purchased order ends up
Thank you for Purchasing this Order. This is where a successfully purchased order ends up
Thank you for Purchasing this Order . This is where a successfully purchased order ends up
def purchased 
      @order = if params[:id].present?
        Effective::Order.find(params[:id])
      elsif current_user.present?
        Effective::Order.purchased_by(current_user).first
      end
      if @order.blank?
        redirect_to(effective_orders.my_purchases_orders_path) and return
      end
      EffectiveOrders.authorized?(self, :show, @order)
      redirect_to(effective_orders.order_path(@order)) unless @order.purchased?
    end
def purchased @order = if params [ :id ] . present? Effective :: Order . find ( params [ :id ] ) elsif current_user . present? Effective :: Order . purchased_by ( current_user ) . first end if @order . blank? redirect_to ( effective_orders . my_purchases_orders_path ) and return end EffectiveOrders . authorized? ( self , :show , @order ) redirect_to ( effective_orders . order_path ( @order ) ) unless @order . purchased? end
Thank you for Purchasing this Order.
Thank you for Purchasing this Order .
# Thank You!