Removed acts_as_ordered. Fixed bug in group_orders archive.

This commit is contained in:
benni 2012-10-03 20:08:23 +02:00
parent eb532babd6
commit 92649d3053
23 changed files with 3 additions and 822 deletions

View file

@ -58,8 +58,8 @@ class GroupOrdersController < ApplicationController
:conditions => { :state => 'closed' }, :order => "orders.ends DESC"
respond_to do |format|
format.html # myOrders.haml
format.js { render :partial => "orders", :locals => {:orders => @closed_orders, :pagination => true} }
format.html # archive.html.haml
format.js # archive.js.erb
end
end

View file

@ -2,7 +2,6 @@
#
class Order < ActiveRecord::Base
extend ActiveSupport::Memoizable # Ability to cache method results. Use memoize :expensive_method
acts_as_ordered :order => "ends" # easyier find of next or previous model
# Associations
has_many :order_articles, :dependent => :destroy

View file

@ -0,0 +1 @@
$('#closed_orders').html('<%= escape_javascript(render("orders", orders: @closed_orders, pagination: true)) %>');

View file

@ -1,10 +1,4 @@
- title "Bestellung: #{@order.name}"
#element_navigation
= link_to_unless @order.previous == @order, "<< #{@order.previous.name}", @order.previous
|
= link_to "Übersicht", orders_path
|
= link_to_unless @order.next == @order, "#{@order.next.name} >>", @order.next
// Order summary
.left_column{:style => "width:65em"}