search for: skip_typ

Displaying 6 results from an estimated 6 matches for "skip_typ".

Did you mean: skip_to
2009 Jan 21
1
AR to_xml problem with associations, Builder::XmlMarkup#to_a
When I do a to_xml(with a block) on an association of a model I got a Builder::XmlMarkup#to_ary should return Array Example that does not work. @intervenant = Intervenant.find(params[:id]) output = @intervenant.to_xml( :skip_types => false, :dasherize => false) do |xml| @intervenant.individu.to_xml( :builder => xml, :skip_instruct => true, :skip_types => false, :dasherize => false) do |xml_individu| #do special stuff at this level..... end end Ex that do work but seems little bi...
2008 Aug 27
11
find_by_sql and xml_serializer problems
Hi, I''m doing a find_by_sql and am getting an odd error when trying to render the result to xml. The find is: children_list = find_by_sql("SELECT components.componentid, components.logicalname, versions.level, versions.branch, versions.sequence FROM components, versions where components.componentid = ''" + component_id + "''" + " AND
2010 Aug 29
0
active_support/mini_xml question/bug?
..."?> <hash> <elist type="array"> <elist> <element type="integer">1</element> </elist> <elist> <element type="integer">2</element> </elist> </elist> </hash> Also with skip_types: >> puts b.to_xml(:skip_types => true) <?xml version="1.0" encoding="UTF-8"?> <hash> <elist> <elist> <element>1</element> </elist> <elist> <element>2</element> </elist> </eli...
2008 Jan 08
1
howto rebuild a object from a received xml hash structure ?
...REST web service # GET /user/membership.xml?email=emailaddress def membership @user = User.find_by_email(params[:email]) respond_to do |format| format.xml { render :xml => @user.to_xml( :only => [ :first_name, :last_name, :display_name, :membership_type, :membership_at], :skip_types => true)} end end my client web app get it : @referee = Referee.new(params[:referee]) url = "http://#{WWW_HOST}/user/membership.xml? email=#{params[:referee][:email]}" result = Net::HTTP.get(URI(url)) data = XmlSimple.xml_in(result) ------------ GOT IT BACK...
2006 Jul 31
2
is it possible to make to_xml use underscore instead of dash?
Hi all, I am getting ActiveRecord to produce XML with render :xml => @user.to_xml However, on the client end it is a bit annoying for me to deal with attributes like first-name. I would much rather have first_name. Is there any way for me to turn off the behavior of converting _ to -? This seems to be done by a call to dasherize inside the to_xml of
2009 Jan 09
2
Confused about to_xml() in ActiveRecord::Base subclass
Since all my efforts to control how to_xml() is formatting dates has failed, I''m now considering writing my own to_xml(). However, from the limited examples I''ve found, I just don''t understand how to actually reference the columns for the records in my record set. Here''s a simplified view of my ActiveRecord object: class Errors < ActiveRecord::Base