similar to: Builder::XmlMarkup and dashes

Displaying 20 results from an estimated 200 matches similar to: "Builder::XmlMarkup and dashes"

2008 Sep 03
5
Eager load associations in Oracle problem with more than 1000 records
I think Rails 2.1 introduced a bug when eager loading of associations with Oracle. In 2.1 ActiveRecord loads the included table with a big ''IN'' query: ''where association.id in (1, 2, 3, 4...)''. The problem is that Oracle has a hard limit of 1000 values in an IN clause. I get this error: ''OCIError: ORA-01795: maximum number of expressions in a list
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 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,
2005 May 01
5
Example using Builder::XmlMarkup and .rxml files?
Greetings, I''m a newby to both "R"s in RoR. I would like to use Builder::XmlMarkup to generate my pages. If there is a working downloadable example somewhere, that would probably be enough. Otherwise, here''s what I want to do: With the following controller: class AccountsController < ApplicationController layout ''accounts'' model :account
2007 Nov 21
4
Builder::XmlMarkup adds <inspect/> on printing and <clone/> on saving
Hello, I am new in this group. Please give me a short hint, in case this is the wrong place for my posting. I want to create an XML file and store it in "filetransfer". The XML part of the file (the body) sould go to "filetransfer.data". Despite the last line, everything is fine with the code below. With "filetransfer.save" two entries "<clone/>"
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
2009 Feb 19
0
Can't seem to instantiate Builder::XmlMarkup.new?
I am unable to instantiate the Builder::XmlMarkup.new on one development machine ( Windows ) and upon my CentOS server. When I run the same code on my Ubuntu 8.10 VMWare machine, everything runs great? In the Builder documentation ( http://builder.rubyforge.org/ ) it shows to put this at the top of the controller; require ''rubygems'' require_gem ''builder'' but
2006 Apr 27
3
XML output
Hi, Sorry abt the half finished post that I sent out earlier. The idea is to generate an output xml response as such: <?xml version="1.0" encoding="ISO-8859-1" ?> <response status=''NOT_AVAILABLE''> <message>Some text</message> <from>Me</from> </response> I make a request like such
2006 Jun 20
3
How to get hold of a patch
I have been researching a problem and found that ticket 4989 solves my problem (to_xml has new dasherize option). I am new to RoR and was wondering if the patch that has been mentioned is available for public release. If so where can I find it and how to apply? Thank you Andrew -- Posted via http://www.ruby-forum.com/.
2006 Jul 14
2
how to get builder 2.0 to escape attributes in rxml
I am using rxml to produce opml files and need to escape ampersands in the attributes. builder 2.0 docs found at http://builder.rubyforge.org/ show the following xml = Builder::XmlMarkup.new xml.sample(:escaped=>"This&That", :unescaped=>:"Here&amp;There") xml.target! => <sample escaped="This&amp;That"
2008 Nov 10
3
to_xml and helper methods
Hi, I have an array with objects and I want to generate an XML like: <objects> <object> <category_id>1</category_id> <helper-method>result 1</helper-method> </object> <object> <category_id>2</category_id> <helper-method>result 2</helper-method> </object> </objects> The helper
2010 May 17
0
ActiveResource 3 on MRI 191: NameError (uninitialized constant Builder::XmlBase::Symbol)
We''ve run into this before and, in this particular project, I''m positive we had a hack somewhere to get AR to work but it seems to have gone missing and I''m not finding any hints in git history or Google. Any call to an AR.create will trigger it. Seems like a strategically placed require or include did the trick but I''m probably misremembering. The offending
2006 Aug 15
2
to_xml and underscores
hi, i am looking for a solution whereupon calling myEntityObject.to_xml does not convert my attributes containing underscores into hyphens. at the moment an attribute named "my_own_attribute" is converted into <my-own-attribute>. does anybody have an idea how to change that and have to_xml generate <my_own_attribute> thanks ciao robertj -- Posted via
2006 Jul 03
2
XML Builder - xml header...
for some reason, i am getting an extra: <?xml version = "1.0"?> in my xml file.. i am using a file called: lastLogins.rxml and the code looks like: xml = Builder::XmlMarkup.new xml.instruct! :xml, :version=>"1.0", :encoding => ''ISO-8859-1'' xml.loginData do @lastLogins.each do |login| xml.entry do xml.user(login.user)
2007 Oct 10
1
rxml cdata problem!!!!!
source) xml.list {xml.cdata! "test"} result) <list> <![CDATA[test]]> </list> but I want to <list><![CDATA[test]]></list> (because firefox don''t understand first result) how to????? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails:
2007 Mar 26
2
Issue generating XML with hyphenated element names
Hello... I''m trying to generate and XML file using .rxml and I''m having a problem with element names that contain a hyphen. Here is a chunk of the .rxml file: xml.instruct! :xml, :version=>"1.0" xml.properties do @properties.each do |p| xml.property do xml.location do xml.street-address(p.street_address) xml.city-name(p.city) .. end end end
2006 Jan 30
5
a RJS problem/patch
Hi, add_rjs_to_action_view.rb of javascript_generator_templates doesn''t work with setting Content-Type in a controller. (e.g.) http://wiki.rubyonrails.org/rails/pages/HowtoSetDefaultEncoding class ApplicationController < ActionController::Base before_filter :set_charset def set_charset @headers["Content-Type"] = "text/html; charset=utf-8" end end I
2006 Mar 19
2
Pretty-Printing (X)HTML Output
I''ve gone down (hopefully the correct) route of breaking up my layout(s) into common/generic elements such as the html head etc, but when the page renders there is no consistency in indenting - it''s all over the place (I''ve de-tabbed everything with the same result). Is there a standard/existing way of pretty-printing output? I''ve searched without any real
2008 Apr 28
4
Render partial from model?
Hi, I know that this goes against MVC, but is there any way to render a partial from a model? The reason for me wanting to do this is that the caching logic is quite complex and I would like to keep it in the model. Thanks, GiantCranes -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the
2006 Aug 05
1
XML from Builder without the to_s element
Hi All, I''m trying to return XML from a Rails view of an object I built up using Builder::XmlMarkup and I find an annoying side effect is that I get an extra <to_xml/> or <to_s/> element back which makes REXML hiccup thinking I''m adding a recond root element when I try to parse the return. How can I return the XML without this last element? Thanks, Vince