Displaying 20 results from an estimated 10000 matches similar to: "rxml template accidentally rendered within html layout"
2007 Jun 26
0
Best way to render KML files using RXML templates
I want to produce google maps KML files which are baiscally XML files
with a KML extention. I''m using restful routes and respond_to. The
best way I''ve found is to use
respond_to do |format|
format.kml { render :action => "kml" }
will render a kml.rxml template I have but really I want to have
action.rxml rendered for kml files.
Is there are way to acheive this,
2006 Jul 20
2
Why is my rxml view being wrapped by the rhtml template in views/layouts?
Why is my rxml view being wrapped by the rhtml template in views/
layouts?
I was experimenting with REST, I had a nice little test program with
one table: ''resources''. Here''s what the show method looks like:
def show
@resource = Resource.find(params[:id])
respond_to do |accepts|
accepts.html
accepts.xml
end
end
I have a show.rhtml
2008 Apr 20
1
Why is respond_to always rending the RXML view?
I''m having a problem in Rails 2 where respond_to is always rendering the
RXML view even in the HTML rendering response. Can anyone tell me why
this might be happening? Here''s a code snippet:
respond_to do |accepts|
accepts.html
accepts.xml { render :action => ''show.rxml'', :layout => false}
end
If I change this to the following it works fine:
2006 Sep 26
0
Is it possible to render RXML partials in RHTML templates?
I have a RHTML template and I would like the output of a RXML partial to
be embedded within it.
When I do <%= render(:partial => ''list_edit'') %> where there exists a
_list_edit.rmxl file, I get XML parsing errors in the browser - I
believe because the partial is causing the rendered content to be
identified as XML instead of HTML.
Is there any way to
2006 Aug 30
1
Shouldn't rxml files be exempt from layout by default?
RJS templates are the only template type that are exempt from layout
by default.
Don''t you think it makes sense to add rxml to the list of exempt
extensions? I''d assume most people would be surprised to see their
XML embedded in the middle of their (most probably) rhtml layout.
http://dev.rubyonrails.org/svn/rails/trunk/actionpack/lib/
action_controller/base.rb:
2007 Aug 29
0
xml builder using straight xml within the rxml template
I was wondering how can I insert straight xml, ie "<a>test</a>" inside
the builder syntax.
For example, i want to be able to do something like this
xml.A do
xml.B do
"<a>test</a>"
end
end
should give:
<A>
<B>
<a>
test
</a>
</B>
</A>
Anybody have a clue on this one?
--
2006 Feb 02
1
actionmailer - No rhtml, rxml, or delegate template
I''m getting this error when I try to send an email.
No rhtml, rxml, or delegate template found for signup_thanks
But I do have signup_thanks.rhtml in app/view/notifier
This is in the notifier model.
class Notifier < ActionMailer::Base
def signup_thanks(sent_at = Time.now)
@subject = "the subject works!"
@body["first_name"] = "first name"
2005 Nov 30
0
How to select between RXML and RHTML template at runtime ?
Hi !
I have some actions which I'd like to serve using XML instead of HTML.
I have two action templates: action.rhtml and action.rxml. If I do
render :action => 'action', ActionPack automatically selects the RHTML
template.
Is there a programmatic way of selecting which template I'd like to use ?
Thanks !
--
François Beausoleil
http://blog.teksol.info/
2010 Oct 27
0
"Missing partial layouts/application" error on render :partial => "index", :layout => "application" - Rails3
This is the second time I have seen this error, and been googling around and
cant find an explanation. This error is happening with Rails 3/1.9.2 and was
not with Rails 2.3.8/1.8.7:
*Template is missing
Missing partial layouts/application with {:handlers=>[:erb, :rjs, :builder,
:rhtml, :rxml], :formats=>[:html], :locale=>[:en, :en]} in view paths
2006 Jun 08
1
No rhtml, rxml, or delegate template found
hi ,
i''m having a problem with rendering a partial , the partial is in the
apps/view/polls folder with the name : _antwoorden_user.rhtml
in the view i''m rendering it with
<% if @user %>
<%= render :partial => ''polls/antwoorden_user'', :locals => {:poll =>
@poll, :user => @user} %>
<% else %>
....
gives me the error =>
No
2007 Sep 29
1
templates with same name before extension are cached
Hi all,
I was just wondering if this is the intended behavior. Here is my setup:
controller
def index
respond_to do |f|
f.xml { render :xml => true }
f.html { render :layout => :none }
end
end
In my views I have a file for each type
index.herb
index.xerb
The first request I send is cached and interferes with the other one.
For example, if I send an xml request
2006 Dec 12
2
RXML partial question
All,
I have a RXML template which renders partial RXML templates within it.
A snippet is below. The "xml" variable is the parent template''s Builder
variable. It is passed into the partial under the name "parent_xml".
Why can''t I use :locals => {.... :xml => xml ....} in my call to render
the partial? It seems like if I do use :xml => xml, it
2005 Nov 03
1
Builder / rxml views: hyphens in XML element names
I''m having a strange problem with an rxml view - it won''t let me put hyphens
in the names of XML elements.
The original problem line was:
xml.VISA-SSL do
But in any other place, if I insert a hyphen into the name of any arbitrary
element, I get the following kind of error:
undefined method `theTextAfterTheHyphen'' for #<#<Class:0xb7617180>:0xb7616f28>
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 26
1
mixing ebr and builder together and having it render as html in the browser
The first problem is that if you make a builder or .rxml file it always
displays as xml in a browser. declare! it and the browser gives and error
and if you change rxml to rhtml then it thinks you should be making erb. SO
quetion #1 is how do I make builder files render in the browser as html.
The next thing that I want to be able to do is be able to render parcials or
call other files of other
2008 Jul 03
1
Include xsl template in .rxml file
Hello,
I have the following code:
xml.instruct! :xml, :version=>"1.0"
xml.instruct! ''xml-stylesheet'', :href=>''/stylesheets/java_app.xsl''
xml.blueman do
xml.response do
xml.code(@response.code)
@response.url ||= ""
xml.url(@response.url)
@response.message ||= ""
xml.message(@response.message)
end
end
But when
2010 Jun 24
0
Rails3: render_to_string of a .html.erb when request is a json request raises MissingTemplate error
I''ve the following situation (which actually works in Rails 2.3.8 and
this is a result of the migration of our app to rails3):
I have a partial which is rendered a few times (imagine tr''s in a
table). On the clientside there''s a script that does a json request
for a specific row (jQuery + ajax dataType: ''json'' and type: ''POST'')
In
2008 Jan 16
0
respond_to, mime types and excel
Hello All,
I''m trying to figure out how respond_to actually works, especially with
the increased focus on REST.
After I set a MIME type for Excel
Mime::Type.register "application/vnd.ms-excel", :xls
In my index action''s respond_to block
I have format.xls {
@parts = Part.find(:all)
headers[''Content-Type''] =
2005 Apr 13
2
render_partial & RXML
Does render_partial work within a RXML file? I am attempting the following:
xml.users do
for user in @users
render_partial ''user'', user
end
end
All that is output is:
<user>
</user>
Without any exception or anything to indicate that I''m doing something
wrong. Does anyone have any experiece with this?
Josh
2006 Jul 12
1
RXML returns a blank page
Hello,
I built a simple rxml page that should print the contents of a table in XML.
It works perfect localy, using Mongrel.
But I have a VPS server with the same data, but running Lighhtpd.
There, it returns a blank page....
Is it because of mongrel/lighttpd ? How could I fix that ??
Thanks,
Parra
-------------- next part --------------
An HTML attachment was scrubbed...
URL: