This is how I solved my problem, using find ( :all ):
def list_xml
@rv_wrk_medical_staffs = RvWrkMedicalStaff.find( :all )
render :xml => @rv_wrk_medical_staffs.to_xml
end
Chris.
--- In RubyOnRails@yahoogroups.com, "gers32" <cbu@...> wrote:
>
> For the purpose of calling from a Flex HTTPService, I need to create
> an XML version of the Rails-generated list() function. The original
> is:
>
> def list
> @rv_wrk_medical_staff_pages, @rv_wrk_medical_staffs = paginate
> :rv_wrk_medical_staffs, :per_page => 10
> end
>
> I tried applying to_xml() to @rv_wrk_medical_staffs, but get the
> following error message:
>
> "Not all elements respond to to_xml"
>
> Thanks,
>
> Chris.
>