similar to: Force rendering an otherwise remotely updated section

Displaying 20 results from an estimated 60000 matches similar to: "Force rendering an otherwise remotely updated section"

2006 Jun 13
1
Can I refresh a remotely updated section once?
My object has_many Link objects. So I''ve set up a form on my edit page that uses form_remote to accept a text field and then dynamically create and add a new Link object and remain on the same page. I have a div id="links" region that gets updated to show the current list of links. This works fine. But when I first load the page, if the object already had links, how do I
2012 Feb 01
6
Does Devise make use of a "status" method? Weird bug.
So I''ve inherited a legacy application and I''m trying to work around the edges as I put an admin tool interface on top of the existing code base. I install Devise for user authentication, since I''ve used it in the past. I change none of the default code. And yet, on successful sign in, I get an error: Render and/or redirect were called multiple times in this action.
2006 Jun 09
4
View into a String?
I''ve got a nice XML view of my data that works just fine when I call it from the browser. Now I''d like a different controller method to take that XML and write it to the file system. Since the XML view lives in an RXML file, is there a trick to telling the controller "Get your output into a string" instead of writing it back to the browser? After writing it out
2006 Jun 02
3
Where are the best AJAX examples?
Googling for this has not solved my problems. Is there a particular site that is recommened for its examples and tutorials on Rails'' AJAX capabilities? I know exactly what I want to do, just not how to do it, and am looking for some code to pore over. 1) I have a dropdown that represents the name of an image in a library. When the dropdown value is changed, I would like to refresh
2006 Apr 07
1
error when rendering partial from an email template
Hi, For an ecommerce application, I am trying to create an html email that summarizes a customers order. (This is very similar to the Agile Rails book page 417.) My templates are in two directories. views/ order_mailer/ sent.rhtml store/ _order_summary.rhtml _line_item.rhtml sent.rhtml needs to render the _order_summary.rhtml partial which needs to render the _line_item.rhtml
2006 Jul 17
3
trouble with render :partial from controller
Hi, I''m definitely a newbie on rails here. My very first attempt has gone well up until this point, but for some reason, when I try to do a render partial, I''m getting a full screen refresh. I did a render partial just fine from an rhtml file. This problem is specifically when calling render :partial => "my_partial" from the controller''s .rb code.
2006 Feb 03
2
_form rendering question for adding multiple child objects
Hi I have been following a thread here.. http://www.ruby-forum.com/topic/new?forum_id=3 but it did raise some new curiosities that I hope someone can help address here :) In particular it is with Duane''s super secret hack that works for multiple child objects > There''s a super-secret and mostly undocumented way of doing this > that''s kind of handy, actually.
2006 Jan 13
1
Rendering an RJS template within another RJS template
Is there a way to render an RJS template within another? I''ve put my simplified code below. No errors are generated, but the partial isn''t rendered. I also tried using render :action => ''update_actions'' destroy.rjs--- page.visual_effect :fade, comment_container(@object.id.to_s) # update the number of comments(below is another rjs template) render :partial
2006 Aug 10
2
rendering templates from an engine''s app dir
Hi there, i have a rails application which use the active_rbac engine for user and access control. How can I use the original login, etc. forms which were provided with the engine as partials in my application? I''ve tried all of the below mentioned approaches and it seems so that I cannot reach the templates provided under the [RAILS_HOME]/vendor/plugins/active_rbac/app/views directory.
2006 Feb 07
0
Rendering objects directly via <%= render @some_object %>
My original post might have been overlooked by most, but I''ve made a plugin (link below) which allows rendering of objects directly via the render method: <%= render @some_object %> which would actuall render the @some_object object (the object is even able to handle the options hash. Rendering would actually be handeled by the object itself, by leaving it up to the object to
2006 Aug 08
3
Rendering partials based on conditions
Hi, A bit unsure how this gets accomplished - particularly how it might get set up in the layout. Currently - This is my welcome.rthml (what comes up at main page) <% if @u %> <%= render :partial => "main/session" %> <% else %> <%= render :partial => "main/login" %> <%= render :partial => "main/register" %> <% end %>
2013 Sep 06
1
How do I remotely force an *unconfigured* Digium DPMA phone to re-query the network for the DPMA server?
Consider the following scenario: 1) One or more Digium DPMA phones are plugged into the network. I know their IP addresses and MACs. 2) The Asterisk I want to use as the telephony server starts without the DPMA module. Therefore there are no DPMA sessions between the phones and the server. 3) I install DPMA on the server, and write its configuration file for the phones. I will tie each phone to
2005 Oct 02
1
rendering if template exists
Hi folks, I have a component on my site called RelatedController. I intend to put some links and content related with the current page (controller and action). What I want to do is for the time being is render :partial "#{@current_controller}_#{@current_action}" Then in the component template root I have templates like _products_index _products_cart etc. I have decided to put
2006 Mar 18
0
AJAX and partial template rendering
I was attempting to integrate a data grid component and ran into a problem. I needed to update the <DIV> around my data grid component, however, the original code did not, so it was using Ajax.Request instead of Ajax.Updater to do the Ajax call. I thought that instead of using Ajax.Updater, I could simply leave the Ajax.Request call, and just do a render (:partial =>
2012 May 28
1
rendering a partial inside another using render_to_string and (:formats) in controller
I want to clean my code by moving the duplicated lines : partial = render_to_string( :partial => "#{file}", :formats => [:html] ) to the pagination_partials function. ================================================= WORKING CODE: ================================================= def render_format_search_partial(file, options={}) # TODO remove this line to use the one
2009 Jul 11
6
conditional link_to_remote not re-rendering
I have an int, ''floorfrozen,'' in my table, ''channels'' that can take a value of 0 or 1. When I render a page, an image in a link_to_remote is called differently depending what the value of channel.floorfrozen is, in a partial, as follows: <% if @channel.floorfrozen %> <%= link_to_remote image_tag("/images/icecube.gif"), {:url =>
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 Mar 22
3
Rendering partials in ActionMailer?
Hello, Is anyone out there rendering partials successfully in ActionMailer templates? I am having trouble with this, and wasn''t sure if it was my configuration or something with a version of Rails I''m running. We''ve got over 15 mailer templates, all working like a charm. But we have a piece of shared code, that we''d really like to not have to copy &
2006 Mar 27
2
Trouble with rendering partials
This only works when the partial name matches the object name; if I change "threadtop" to "thread" then it works fine. Is this normal? I get the following error otherwise: "undefined local variable or method `thread''" index.rhtml --- <% for @thread in @threads %> <%= render :partial => ''threadtop'', :object => @thread
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/.