Displaying 20 results from an estimated 3000 matches similar to: "Changes to vendor/builder?"
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
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/>"
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&There")
xml.target! =>
<sample escaped="This&That"
2007 Jun 11
2
Builder::XmlMarkup and dashes
Has anyone hacked Builder::XmlMarkup to dasherize underscore tags by
default? I know I can use tag!, but I''d like to find a way for it to
translate underscores to dashes automatically. In other words:
xml.department_manager do
"fred
end
#=> <department-manager>fred</department-manager>
I tried hacking Builder::XmlBase.method_missing but got myself all
twisted up!
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)
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,
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
2006 Aug 10
28
On the total nondisclosure of the 8/9/06 security vulnerability
Dear Rails team,
The handling of the recent vulnerability in Rails has proven somewhat
problematic for us. We have recently adopted Rails as our web platform
of choice; previously, we used J2EE. We love Rails. We hate J2EE. We
don''t want to go back. It took a lot of effort and convincing to get the
management teams of our various projects to sign off on the use of
Rails. The
2011 Jun 16
7
[PATCH] replace fchmod()-based heartbeat with raindrops
This means we no longer waste an extra file descriptor per
worker process in the master. Now there''s no need to set a
higher file descriptor limit for systems running >= 1024
workers.
---
I just pushed this out to git://bogomips.org/unicorn.git and it''ll
be in Unicorn 4.x.
The subset of raindrops used by Unicorn should work on all machines
with mmap(2) +
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 Mar 29
2
AR 1.14 oracle_adater.rb does not work
the error is :
wrong number of arguments (1 for 0)
where :
active_record/connection_adapters/oracle_adapter.rb:53:in
`attributes_with_quotes_pre_oracle''
this method is new, it was an alias in the previous version :
alias :attributes_with_quotes_pre_oci :attributes_with_quotes
#:nodoc:
I replaced the method by the alias of the previous version, and it is
working fine.
This is
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 Jul 26
0
embedded DTD using Builder
Hello -
I would like to include an embedded DTD in generated XML output. I am
attempting to use the Builder::XmlMarkup class to do this. A simplified
example follows:
xml = Builder::XmlMarkup.new(:indent => 2)
xml.declare! :DOCTYPE,:logs do
xml.declare! :ELEMENT,:logs,''(log*)''
end
The problem that I am encountering is the that second declare! call
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
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 Jan 09
3
Selecting a subset of a table with DRY
Hello,
I have table called ''listings.'' There are a certain combination of
properties which make a listing viewable (e.g., it is confirmed, has
been authorized, hasn''t expired, etc.). Each listing has one and only
one category.
I want to be able to do things like Listing.find_viewable(...) and
Category.find(...).viewable_listings, but I see no way to do this
2013 Dec 09
2
[PATCH] rework master-to-worker signaling to use a pipe
Signaling using normal kill(2) is preserved, but the master now
prefers to signal workers using a pipe rather than kill(2).
Non-graceful signals (:TERM/:KILL) are still sent using kill(2),
as they ask for immediate shutdown.
This change is necessary to avoid triggering the ubf (unblocking
function) for rb_thread_call_without_gvl (and similar) functions
extensions. Most notably, this fixes
2005 Mar 02
3
uprgrade to 0.10: uninitialized constant Class::Object
Hi,
I installed rails 0.10 with ruby gem, and upgraded my application as
described at http://manuals.rubyonrails.com/read/book/15 .
Now, when accessing the action index of the controller rss_feed, I get
this error in the terminal when I started the server:
#<NameError: uninitialized constant Class::Object>
2007 Oct 10
9
Rspec Textmate bundle errors
Hello all,
Having a problem with the Rspec textmate bundle and having quizzed
the guys in #textmate to no success about the errors, I''ve been
suggested to try you guys!
When I run the "Run Behaviour Description" command, I get the
following errors:
/Users/alastair/Library/Application Support/TextMate/Bundles/
RSpec.tmbundle/Support/lib/spec/../spec/mate/runner.rb:34:in