Displaying 1 result from an estimated 1 matches for "reference_d".
Did you mean:
referenced
2011 Sep 15
1
bypass defualt scope.
...iveRecord::Base
belongs_to :shop
default_scope :order => ''updated_at DESC''
end
in the Shop show view I have:
- for document in @shop.documents
%li(id="shop_documents")= link_to document.subject,
shop_document_url(@shop, document)
I want list document based on reference_date attribute and not using
default scope.
I''ve tried:
def show
@shop = Shop.unscoped.find(params[:id], :include => :documents,
:order => "documents.reference_date")
but don''t work.
--
You received this message because you are subscribed to the Google Groups &q...