similar to: Render layout on the fly

Displaying 20 results from an estimated 10000 matches similar to: "Render layout on the fly"

2006 Jan 16
2
render :file question
Hi, I have a layout xyz.rhtml. And a footer.rhtml. Both these files reside in app/views/layouts/. In that layout, I am making a call like this: <%= render :file => "footer", :use_full_path => true%> I have also tried: <%= render :file => "footer"%> footer.rhtml is in the same directory as in xyz.rhtml. I get this exception:
2007 Aug 15
5
Misc notes concerning view_paths
Hi all, I''ve been playing in the trunk with putting stuff in different dirs to keep files from a reusable framework separate from the app files. Here are a few considerations regarding the view_paths setting: config.view_path is used to set both action_controller.view_paths and action_mailer.template_root. We get some buggy/unexpected behavior here because
2006 May 18
4
Cascaded Forms
Hi guys, it''s me again ;) is it possible to put forms into forms? My problem is, i have a form which gathers informations about an SSL Certificate order. There is a field which holds the SSL CSR file. Now i wanted to put in a subform which has an form_remote_tag and decodes that CSR file and returns if everything was okay or not. Now if i put in a submit_tag it submits my form which
2007 Dec 08
6
Rails 2.0 ActionMailer breaks my redmine render_message
I am using ''redmine'' (v 0.6) as my major project manager, seems running fine w Rails 2.0 (slight modifs for paginations..) but I am stuck with a major error when sending a confirmation email : mailer.rb class Mailer < ActionMailer::Base .... # Renders a message with the corresponding layout def render_message(method_name, body) layout =
2006 Feb 05
4
Another layout question - Layouts on a per method basis - Layouts with AJAX
I feel I am very close to understanding how layouts are used in Rails: Q1. I know one can specify a "default" layout for all methods in a controller by specifying layout ''my-default-layout'' How can this be overridden for individual methods so when those methods are called/executed, the overridden layout will be used. Is this possible? Q2. With no
2006 Jul 03
2
rjs renders string or partial but not template or action
Hi, I have an rjs file. I only have one controller called called front. I have views called "new_title.rhtml" and "_new_title.rhtml" These work page.replace_html ''title'', ''new title'' page.replace_html ''title'', :partial => ''new_title'' page.replace_html ''title'',
2006 Jan 13
10
[Announcement] Google: Evil or Not?
"Google: Evil or Not?" is my first Rails webapp and I''ve just made it public at http://evilornot.info Do you still believe the ?Do no evil? Google mantra? Do you think Google Book Search, the AOL deal, and Larry and Sergey?s 767 point to Google losing it?s pristine morality and turning over to the dark side? Now you can discover what the world thinks and contribute your
2008 Mar 24
2
render not able to locate template in publisher
Hi guys, I have a publisher called UserPublisher setup in models directory of my app. The reason I have it in a model is because its then possible for me to invoke publisher methods in after_callbacks of my other models, just the way we do it for ActionMailer. My problem is that when I try to update a users profile specifying location of the view template as a paramater to "profile"
2007 May 13
2
ActionMailer outside of Rails?
Has anyone used ActionMailer outside of rails? I have a requirement for work that will not allow me to do this from within a rails app. I have successfully sent an email in the following manner: MyMailer.deliver_clever_email(someArg,''testing!'') where the second argument is the body of the email, but when I try to call just: MyMailer.deliver_clever_email(someAr) and use a
2007 Jan 25
2
render .rhtmlx if present, otherwise render .rhtml
We have a product where our customer is "allowed" to make minor changes to the .rhtml views. Obviously, this can be an issue when updating the software, as changes need to be merged in. Also, sometimes the customer wants to back out there change but no longer has the original file. SOOO.... I''d like to tell them - if you want to change a .rhtml file - just copy it to
2006 Aug 28
1
Rgraphviz - neato layout - edge weights do not have an effect
Dear all, neato makes layouts according to a physical model in which the length of the edges is determined by springs. The weight of the edge is the strength of the spring. However, I was not able to find any influence of edge weight on the layout. In the http://www.graphviz.org/Documentation/neatoguide.pdf the attribute "len" is another parameter of the neato layout. set.seed(31)
2006 Aug 07
9
problems with ActionMailer
Hi all, I''m trying to create a worker to send a mail to all the users in my db. Right now I''m doing the tests, this is the code in my worker (Masivo is the ActionMailer subclass): def do_work(args) @progress = 0 @logger.info("MAILER: starting job") records = Record.find(:all) total = records.size records.each_with_index do |record, idx|
2006 Jan 17
9
Setting layout template in .rhtml
I''ve a single controller - class ContentController < ApplicationController end in the app/views/content folder I have quite a few .rhtml files I need to be able to choose a different layout template to use in each of these .rhtml files. i''d like to be able to do something like (which doesn''t work..) <% layout ''layout1'' %> Any
2006 Apr 07
3
Ajax render a template
In my blog a user can add comments. I want an Ajax call to add the comment to the bottom of the comments list. How to i return a comment thats is in the comment template and add it to the bottom of the page. I have gotten as far as rendering some text back to the form and the comment doesn''t display until i refresh. This is my _newcomment.rhtml form to create a new comment <div
2006 Feb 15
9
Liquid - form helpers? multiple liquid templates?
Hi, Its taking me a long time to get my head around the Liquid plugin. I have a couple of questions which hopefully someone can help me with... - How difficult would it be to add some kind of Filter or Tag which would allow other Liquid templates to be included into the current Liquid template (eg. similar to render(:file => "filename") - How difficult would it be to add
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
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 17
9
Render No Layout?
Hi guys, Am having a problem. I have this def in my index controller that works like this: def do_something $a = variable1 $b = variable2 $c = variable3 $d = ""<script language=\"Javascript\"> \n new Insertion.Bottom(''#{$c}'', ''#{$a} - #{$b}''); \n </script>" $trigger = "1" render(:partial =>
2006 Jan 12
3
url_for in tests
Hi there, I''ve added an extra bunch of testing features for doing in-browser testing with Selenium, and am having quite a time figuring out how to use url_for with having a controller object present. I''ve tried using ActionController::Base.url_for and ActionView::Helpers::UrlHelper.url_for but haven''t been able to get something that works. What I want to be able
2008 Mar 17
6
REPOST: fallback layout mechanism
Sorry for reposting but as I got no reply so far so I am just coming to try my luck again. I am doing a multi-lingual website which might have several layout pages (language dependent)available. I want to do a mechanism to fall back from one language to another default language if such layout file is missing. Any chance I can do an is_exist check on the layout? With my current code I really want