similar to: DoubleRenderError exception

Displaying 20 results from an estimated 500 matches similar to: "DoubleRenderError exception"

2006 Dec 19
0
Looking for a way to avoid DoubleRenderError.
The "update" action of my controllers and under certain circumstances creates a xml file on the filesystem. Using an after_filter that only gets called after the update action I create the XML file. Problem is, I get a DoubleRenderError because the update action either calls redirect_to or render. I can get around the render call by calling performed?() but the call to redirect_to
2006 Apr 08
2
respond_to causes DoubleRenderError?
I have a custom authentication plugin that redirects users to a login site if they aren''t already authenticated and their session hasn''t timed out. I had things working fine with straight http requests, but wanted to add support for ajax requests. I thought this would be a simple matter of replacing all of my "redirect_to <blah> and return false" calls with
2010 May 24
3
ActionController::DoubleRenderError
def dispfriends @myfriend=[] @myfriendlogin = [] i=0 @currentgroup = Group.find_by_id(params[:groupid]) puts @currentgroup.id @currentfriends= GroupFriend.find_all_by_user_id_and_group_id(current_user.id, @currentgroup.id) for n in @currentfriends @myfriend=n.friend_id @myusers = User.find_by_id(@myfriend) @myfriendlogin[i]=@myusers.login puts @myfriendlogin[i] i=i+1 respond_to do
2005 Jul 07
2
0.13 ajax sortable lists and acts_as_list
I''m trying to figure out a good way to get acts_as_list and the new sortable lists to play nicely together, but they don''t seem like they''re designed to mesh well. The ajax sortable lists post a complete ordered list of ids back to the server after every change, but acts_as_list is designed to deal with diff-like changes, rather than reordering the whole list from
2005 Jun 03
1
sorting on a habtm relationship
I have two tables ("products" and "categories") that have a has_and_belongs_to_many relationship, and I need to be able to arbitrarily sort products in the scope of a category using something like acts_as_list. Problem is, since each product can belong to multiple categories, it doesn''t work to use acts_as_list and have the "position" field be in the
2007 May 21
4
Just upgraded to 1.0.0, should render_text isn''t working for me
I finally got around to upgrading from 0.8.2 (!!). I had a spec which looked like specify "should render abc123" do controller.should_render :text => "abc123" get :key end With 1.0.0, the new spec is it "should render abc123" do get :key response.should render_text("abc123") end However it doesn''t work, giving me the error: undefined
2005 May 17
5
Strings, Variables and GetText
Hi, I''m starting to use GetText and have this code: render_text %(<script language="JavaScript" type="text/javascript"> parent.mainframe.onUpdateNew("Gallery <b>#{@media.name}</b> was successfully created.", "#{@media.name}","#{String(@media.id)}","#{@media.media_type}"); </script>) I need to convert
2007 Sep 29
2
REXML - XML query only returning one (last) result
I''m really new to Ruby on Rails, and I''m trying to read an XML file with REXML. No matter what I try, I am only getting the last result returned from my query. I should be getting 365 results. Here is the code: include REXML require ''rexml/document'' require ''rexml/xpath'' class MakeFootprintController < ApplicationController def index
2005 Dec 26
3
probably a very dumb question
why does <%= render_text "hey ya" %> cause ''undefined method `render_text'' for #<#<Class:0x3851120>:0x3851000>'' can i use render text in a template? -- Posted via http://www.ruby-forum.com/.
2006 Apr 03
9
Problem with Windows not finding methods
I am running (testing) a noob-tube for myself as follows: Windows XP SP2 lighty ruby 1.8.x rails 1.1 scgi I have everything working fairly well, but with one minor exception: the actions that I have defined as follows are not found. class MytestController < ApplicationController def index render_text "Hello Nurse!" end def dilbert render_text "Dilbert
2005 Jul 12
6
Meta-question about the list
Question about the list in general: by default, it''s set up so that replies go to the sender, rather than the list. However, on other lists I usually chat on, replies by default generally go to the list. This seems to encourage more discussion. Would it be a good idea to change that default? Or am I just crazy. Best, Raymond -- Raymond Brigleb, Needmore Designs Website
2006 Aug 16
8
Multiple (AJAX) Observers on the Same Field and MSIE
I have been using multiple observers, i.e., observe_field(), on the same input field and relying on them to execute in the same order that they appear in the page. This has been working fine in FireFox, but it does not seem to work in MSIE; the requests come in and are processed in a different order. Now, I''ve always been a little hesitant about using this technique, but it always
2009 Jun 22
2
question about using _apply and/or aggregate functions
Hi R-list, I'll apologize in advance for (1) the wordiness of my note (not sure how to avoid it) and (2) any deficiencies on my part that lead to my difficulties. I have an application with several stages that is meant to simulate and explore different scenarios with respect to product sales (in units sold per month). My session info is at the bottom of this note. The steps include (1) an
2006 Jan 07
2
can store array or hash in cookies?
Hi According to rdoc: value - the cookie''s value or list of values (as an array). So, I can use arrays, briliant. But.... It does not work (at least on webrick) I wrote a controller: def check_cookies_first cookies[:chef] = {:value => ["first", "second"], :expires => Time.local (2020)} render_text ":)" end def
2010 Feb 17
1
Unwanted case sensitivity
I have also posted this on IRC. I have a linux host running stock RHEL 5.4 Samba 3.0.33-3.15. The host acts both as a Samba server and does a CIFS mount of that same share. The reason for doing this is so that programs running on the Linux host have the same case insensitive view as the Windows clients. I have nocase set in the relevant line in /etc/fstab I have case sensitive = No set in the
2005 Oct 21
8
Wrong number of arguments (1 for 0) on routes.rb
Hi, I''m baffled by this error. I need a simple controller to send e-mails, so first I thought about just creating the controller manually (without using script/generate), since that didn''t seem to work, I created a dummy table in my DB and used the usual procedure to generate scaffold code. Then I modified the controller to have only two methods, send and compose: class
2017 Feb 10
2
[PATCH v2] x86/paravirt: Don't make vcpu_is_preempted() a callee-save function
On 02/10/2017 11:19 AM, Peter Zijlstra wrote: > On Fri, Feb 10, 2017 at 10:43:09AM -0500, Waiman Long wrote: >> It was found when running fio sequential write test with a XFS ramdisk >> on a VM running on a 2-socket x86-64 system, the %CPU times as reported >> by perf were as follows: >> >> 69.75% 0.59% fio [k] down_write >> 69.15% 0.01% fio [k]
2017 Feb 10
2
[PATCH v2] x86/paravirt: Don't make vcpu_is_preempted() a callee-save function
On 02/10/2017 11:19 AM, Peter Zijlstra wrote: > On Fri, Feb 10, 2017 at 10:43:09AM -0500, Waiman Long wrote: >> It was found when running fio sequential write test with a XFS ramdisk >> on a VM running on a 2-socket x86-64 system, the %CPU times as reported >> by perf were as follows: >> >> 69.75% 0.59% fio [k] down_write >> 69.15% 0.01% fio [k]
2006 Jul 04
1
Select Box problem in the controler with Ajax
Hi, I have a selectbox that updates a given span area when a user selects a value. The selectbox has the option :include_blank => true. The controler will fetch the ID of the selected option in the combo box and sends the description of the item with the same ID. The problem is that the user is able to select the empty option, and the controler will not be able to fecth the ID. This
2006 Feb 12
3
.empty? Method
I am using: if @post.empty? render_text "Post does not exist." end But it gives me this error: NoMethodError in Posts#view undefined method `empty?'' for #<Posts:0x39598d0> However, if the method list empty? apears and stuff so I am confused. -- Posted via http://www.ruby-forum.com/.