Displaying 20 results from an estimated 4000 matches similar to: "XML Builder - xml header..."
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
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"
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
2007 Jul 19
0
xml builder cache (with a slight problem on initial load)
Let me give you the background. I am using rxml for a lot of my views
for a rails project. I also noticed that there is a lot of the XML
being dynamically generated on data that doesn''t change that often. I
worked on trying to cache the xml fragment that I needed but came to
the quick realization that cache only handle ERB/RHTML files. Needless
to say, I have spent some time creating an
2006 Apr 27
6
OrderedHash
Looks like I have skipped on this, but still - a couple of questions:
1) Why there suddenly is an OrderedHash in ActiveSupport? (this
glaring omission from ruby core is present in many apps already)
2) Why it doesn''t match the semantics of Hash respectively?
3) Why it''s #nodoc ?
--
Julian ''Julik'' Tarkhanov
please send all personal mail to
me at julik.nl
2007 Sep 25
13
Session cookies not passed on first redirect
Hello Campers!
Is it just me or does Camping init the session twice on a redirect?
If I have an app and when the user visits it for the first time, a
session is generated. Afterwards I redirect the user in a service
(that basically does auth) and he gets bounced to the login page -
but when I arrive at the login page my SID somehow has changed :-( so
there is a stale session dangling
2006 May 31
4
Sending files through send_file or by httpd?
If I were to serve files, would send_file via rails be slow?
I think they will be 200mb avi files.
Would it be better to send them via /public ?
But I would like to track the clicks on each file - which makes me think
that I can''t serve them out on /public as those clicks will not go
through my application.
Any help or suggestions?
--
Posted via http://www.ruby-forum.com/.
2007 Sep 25
16
putting away HashWithIndifferentAccess
Hey, campineros. And many good handshakes to zimbatm for getting
some patches applied.
So, yeah, I''d really like to get rid of any serious dependancies with
this 1.6 release. Anything that''s not in stdlib has to go. Of course,
camping-omnibus will still assume the whole ActiveRecord, Markaby,
Mongrel setup that''s in the history books.
Metaid can be removed and
2006 Jun 04
3
Absolutize URLs in a string
I wonder - do we have some helper/processor/gem to automatically
convert all URLs in a passed string to their canonical equivalent -
i.e. with the protocol, host and such prepended based on the Rails
environment. Super-duper infty for RSS feeds (I hate their
requirement for canonical URLs everywhere).
--
Julian ''Julik'' Tarkhanov
please send all personal mail to
me at
1999 Dec 27
2
Suggestion: login.c->record_login()
Hi,
A lot of the problems with openssh portability so far appear to be with
the login record functionality, i.e. lastlog support, and variations on
handling utmp vs. utmpx etc. Looking at for-profit SSH 1.2.27, login.c
is rather embarassing spaghetti code, so laden with '#ifdef's it's
almost impossible to read.
OpenSSH's code isn't anything like that, but then it doesn't
2006 Jun 26
3
Scriptaculous Sortable Element Issue
I have a <ul> that contains a number of list items, and I''m using the
sortable_element helper to reorder then via drag-and-drop. This works
great, however, when I insert a new <li> into the <ul> with Ajax, the
sortable_element doesn''t know about it. Is there a way to refresh this
collection?
Thanks for any help.
--
Posted via http://www.ruby-forum.com/.
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
2009 Mar 29
5
Rack::Lint::LintError with latest camping and rack
I''m trying to use Camping from Magnus'' repo (1.9.300) but running the
blog.rb example (or anything for that matter) gives me
Rack::Lint::LintError at /
Content-Length header was 0, but should be 548
Ruby C:/ruby-1.8.7/lib/ruby/gems/1.8/gems/rack-0.9.1/lib/rack/lint.rb:
in assert, line 16
Web GET localhost/
There are no errors on the camping output so I suspect something has
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
2005 Apr 26
10
Cannot force WeBRICK into submission (UTF-8)
Hello everyone!
Pushing my new rails project I stumbled upon some weird problem.
I cannot force WeBRICK to show me my MySQL records in UTF-8. All I
recieve into the object (instead of russian letters) are question marks
(a la ?????? style). I am running MySQL 4.1 (the one with switchable
charsets) and a binary Ruby extension for it, all on OSX.
To me it looks like MySQL never recieves what I
2007 Oct 02
19
Per-Request View Paths
I haven''t had a chance to work on fixing multiple controller view paths
recently. My original patch attempt was:
http://dev.rubyonrails.org/ticket/8582
It was rejected due to the fact that it was fixing the symptom more than the
problem.
However, I think it''s critical that this problem get fixed, otherwise the
whole concept of view_paths is severely neutered and
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 Aug 07
3
character encoding in RoR
Hi, I''m a newcomer to Ruby and to Rails, and am having a problem with
character encoding.
Now, I know ruby doesn''t handle unicode...but, characters like ? (eacute)
and ? (ccedil) are part of the iso-8859-1 charset, so it shouldn''t be a
problem, right?
But, for some reason, the string functions still seem to hang on those
characters.
As an example, in a brand new rails
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 Jun 28
2
simply_restful plugin tests failing???
Has anyone successfully ran the simply_restful tests? Here is how I''m
running the tests and the first error. I''m I missing something here?
>rails test
>cd test
>rake rails:freeze:edge
>./script/plugin install simply_restful
>ruby vendor/plugins/simply_restful/test/routing_test.rb
Loaded suite vendor/plugins/simply_restful/test/routing_test
Started
FFFFF