- migrated software.o.o to rails 2
[opensuse:software-o-o.git] / app / controllers / order_controller.rb
1 class OrderController < ApplicationController
2   session :disabled => false
3
4   def new
5     @order = Order.new params[:order]
6   end
7
8   def save
9     @order = Order.new params[:order]
10     if @order.save
11       Promomailer.deliver_promo_order @order
12       redirect_to :action => "thanks"
13     else
14       flash[:save_errors] = @order.errors.full_messages
15       redirect_to :action => "new", :order => params[:order]
16     end
17   end
18
19   def thanks
20   end
21 end