search for: rxml

Displaying 20 results from an estimated 135 matches for "rxml".

Did you mean: reml
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...
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 work...
2005 May 01
5
Example using Builder::XmlMarkup and .rxml files?
...artial "form" %> <%= submit_tag "Edit" %> <%= end_form_tag %> <%= link_to ''Show'', :action => ''show'', :id => @accounts %> | <%= link_to ''Back'', :action => ''list'' %> to .rxml using Builder::XmlMarkup... something like acccounts.rxml: xml.html { xml.head { xml.title { controller.action_name } stylesheet_link_tag ''scaffold'' } xml.body { @content_for_layout } } and convert the template to edit.rxml that at least starts off...
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: def template_exempt_from_layout?(te...
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, or add an extra extension like action.kml.rxml that can be picked up ? Should I be using register_template_handler("kml", ???) and specify whichever existing class handles the...
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 hav...
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'' fo...
2006 Nov 07
0
rxml template accidentally rendered within html layout
Hi, I have the following in my controller: def show @quest = Quest.find(params[:id]) respond_to do |format| format.html format.xml end end And in my routes: map.resources :quests I have two views for this action, quests/show.rhtml and quests/show.rxml. Now what I would expect as a response to ''/quests/1.xml'' is that Rails sends, as XML, the rendered rxml view. What happens instead is that the rxml view is rendered inside the default html layout! How can that be? Ingo -- Posted via http://www.ruby-forum.com/. --~--~------...
2007 Sep 29
1
templates with same name before extension are cached
...er one. For example, if I send an xml request first, followed by html, here is what I see (those are just some debug statements I put in to follow the code) Request 1 "Accept: text/xml" - "starting find_template, options are :" {:action=>"index", :ext=>"rxml,xerb,builder"} - match on elsif action path is : /Users/dusty/nms/app/views/testing/index - no cache, created glob glob is : /Users/dusty/nms/app/views/testing/index.{rxml,xerb,builder} - searched Dir[glob].first and found found is : /Users/dusty/nms/app/views/testing/index.xerb - fini...
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! =&...
2006 Aug 15
5
XML question
Is there a way you can use RoR to create an .xml file? Say I had a DB full of info that I wanted to format and have export as "lorem.xml" inside of a specific directory in my web server? Then, each time I updated the DB it would re-export the file (delete the old, save the new?) -- Posted via http://www.ruby-forum.com/.
2008 Oct 14
2
best-practice for programmatically using rxml generated from controller/view? (or 'how can I view a view from a model')
...fic XML I need to create and then POST it somewhere. It sounds easy enough, but I''m running into issues when it comes time to actually use the XML. Trying hard to stay within the MVC pattern I: 1) Create a controller which loads the models I''m about to turn into XML 2) Create an rxml view which renders the XML I need perfectly Now I need to actually *use* this XML in a "model" and POST it to the webservice endpoint. Now, I am not asking "how can I render a view in a model?". What I am asking is "how can I view a view from a model?" It seems logic...
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...
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...
2006 May 30
2
No rhtml, rxml, rjs... problem with Action Mailer, again
Hi all I have seen a lot of people writing my same problem but I haven''t found the solution yet. This is the problem: "ActionView::ActionViewError in Periodico#index No rhtml, rxml, rjs or delegate template found for..." when trying to send email through action mailer. I have created the Notifier.rb model (in app/models/ folder) def signupthanks(user) # Email header info MUST be added here @recipients = user.email @from = "from@myorg.org&quo...
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"] = &quo...
2006 Feb 18
1
Should assert_tag be used to test rxml views?
I''m getting strange errors attempting to test an rxml view with assert_tag. I can see that what the view is producing is correct but I get an error like "ignoring attempt to close foo with bar" (where bar is a tag which is meant to be nested in foo). Is asssert_tag meant for xml, or just html? Cheers, Robert. -- Posted via http://www....
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 HT...
2009 Apr 22
1
how can I get the friends of a fb user only using his facebook id
...ase let me know how... (and don''t read further) If this is not possible, then here is my problem: ------------------------------------------- I have a flash movie embedded in the canvas page of my Facebooker application. The movie gets information from an xml file, which is generated by .rxml file, but this rxml file has no information related to the current facebook user and his session. So I can only pass some data that comes from the <fb:swf> flashvars through the flash movie to the .rxml in the form of url arguments. One possible things to pass is fb_sig_user, which is the fac...
2006 Jun 08
1
No rhtml, rxml, or delegate template found
...r 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 rhtml, rxml, or delegate template found for polls/_antwoorden_user here''s is the application trace c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_view/base.rb:281:in `pick_template_extension'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_view/base.rb:195:in `r...