Search the web
Sign In
New User? Sign Up
RubyOnRails · Ruby on Rails
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Show off your group to the world. Share a photo of your group with us.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
XML version of a Rails-generated list function   Message List  
Reply | Forward Message #73 of 107 |
Re: XML version of a Rails-generated list function

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.
>





Mon Aug 27, 2007 6:06 am

gers32
Offline Offline
Send Email Send Email

Forward
Message #73 of 107 |
Expand Messages Author Sort by Date

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 ...
gers32
Offline Send Email
Aug 24, 2007
1:05 pm

This is how I solved my problem, using find ( :all ): def list_xml @rv_wrk_medical_staffs = RvWrkMedicalStaff.find( :all ) render :xml =>...
gers32
Offline Send Email
Aug 27, 2007
2:37 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help