Displaying 3 results from an estimated 3 matches for "documentscontroller".
Did you mean:
documents_controller
2008 Dec 05
3
2 forms in one page,how to arrange the code and do it restful?
...hink maybe i have
some misunderstanding of restful!
Solution1:
let the document handles them all, put the current page under folder
"views/documents", make the author search form a partial template and
locate it under folder "views/documents" too, put the search_author
method in DocumentsController.this really works,but it break the REST
rules, how could i write the url for search_author method?
I think the search_author method should be write in
AuthorsController.If I do this, i can not get the search result
@authors from AuthorsController.
Solution2:
It seem that the document belongs to th...
2006 Sep 11
5
WebServices & controllers
Hi,
I am having problems with REST web-service support.
I have a simple controller:
class DocumentsController < ApplicationController
wsdl_service_name ''Documents''
web_service_api DocumentsApi
web_service_scaffold :invoke
def list
@docs = Document.find(:all)
respond_to do |wants|
wants.html
wants.xml { return @docs .to_xml }
end
end
end
Then, my api...
2006 Aug 02
2
Ajax_Scaffold display from link table
...;'category_id'' , Document.find_{[p.id ] } %>
</div>
documents_controller.rb
@paginator, @documents = paginate(:documents, :order => @sort_by,
:include => :category, :per_page => default_per_page)
I keep getting the following error:
ActiveRecord::StatementInvalid in DocumentsController#component
Mysql::Error: #42S22Unknown column ''categories.document_id'' in ''on
clause'': SELECT COUNT(DISTINCT documents.id) FROM documents LEFT OUTER
JOIN categories ON categories.document_id = documents.id
Can anyone help me and point out where i am going wrong...