similar to: Is it possible to render RXML partials in RHTML templates?

Displaying 20 results from an estimated 11000 matches similar to: "Is it possible to render RXML partials in RHTML templates?"

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
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
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
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/
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 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
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
2006 Mar 20
1
AJAX in conjunction with partials
All, Trying to clear up some confusion on my part. If I make an Ajax call using Ajax.Request and in the controller method that I call, I do a render (:partial => ''whatever.rhtml''), should I expect that ''whatever.rhtml'' will be rendered in the browser or not? Put another way, is it in any way reasonable for me to think that Ajax.Request + partial render
2006 Mar 18
9
Using <%= text_field %> within partials is problematic
All, Thanks for any help in advance. I have what I think is a very straightforward partial template and I can''t figure out why a text_field call within it doesn''t work. Here is my calling template: lists.rhtml <div id="target_lists"> <%= render(:partial => "target_lists", :collection => @target_lists) %> </div> In the partial
2006 Mar 14
5
Best way to use partial rendering in global layout
I have a global layout in application.rhtml and I''d like to render a partial template within it. Currently, I have this: <%= render (:partial => ''side_nav'') %> but it seems to be looking in the controller specific view directory. What is the best way to do handle controller - global partial rendering? Wes -- Posted via http://www.ruby-forum.com/.
2006 May 24
5
rxml vs rhtml
I have been wondering if anyone here knows which format is faster for your templates? I am curious cause in the near future I may be using some expensive scripts (timewise) and would like to try and squeak out as much performance as possible. Is Ruby like other languages (ASP classic for example) that inccur a penalty by switching between HTML and Ruby Code? Ben -- Posted via
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 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:
2006 Apr 05
1
Tag libraries for ERB/RHTML?
For any JSTL/JSP tag library heads out there - any projects underway to generate tag libraries for ERB and hopefully standardize some of that basic RHTML behavior? Seems like closures are just the thing for implementing a tag processing class, too. Thanks, Wes -- Posted via http://www.ruby-forum.com/.
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 Aug 09
3
Deployment: Segregating static files from RHTML
All, I am deploying on a production system using Apache/fastcgi. I would like Apache to take care of all of my static files and dispatch.fcgi to take care of all of my Ruby templates. In order to achieve this separation, do I need to set up two vhosts in Apache, one to serve static content and one to serve dynamic content? Has anyone done this in production and can point me to the right
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 Apr 17
2
Refreshing RHTML page with previously posted data?
All, After a POST, I want to be able to redisplay a view with the data that was previously entered when my controller action notices a validation failure and calls render on the view that does the submit. Example: View x.rhtml - text field is filled in Call controller action Controller action fails validation calls render (:action => ''x'') x.rthml shows up with blank text
2007 Jan 25
1
render rhtml templates in worker
I''m trying to make a worker that will render a large page to a file, very similar to what rails'' builtin cacheing does except with the rendering done outside of rails. The only advice I''ve found is to use ActionController::Integration::Session.new but this doesn''t seem to allow setting session variables the way the functional tests do. Is there a way to