Removed acts_as_ordered. Fixed bug in group_orders archive.
This commit is contained in:
parent
eb532babd6
commit
92649d3053
23 changed files with 3 additions and 822 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
1
app/views/group_orders/archive.js.erb
Normal file
1
app/views/group_orders/archive.js.erb
Normal file
|
|
@ -0,0 +1 @@
|
|||
$('#closed_orders').html('<%= escape_javascript(render("orders", orders: @closed_orders, pagination: true)) %>');
|
||||
|
|
@ -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"}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue