similar to: How do you stop a Ruby method from executing?

Displaying 20 results from an estimated 30000 matches similar to: "How do you stop a Ruby method from executing?"

2009 Jul 12
3
RJS render errors when user clicks away before render completes
We have an issue where we are using RJS templates to render the results of Ajax calls. Everything works fine so long as the user waits for the render to occur. However, if the user initiates the request and the RJS template is still in the process of rendering, but hasn''t completed, and the user clicks a different link, then we get a Javascript alert popup "Unexpected Server
2008 Jul 22
5
RJS opener.reload()
Hello, I have a problem with RJS. I have a popup and by pressing a button within it I want to: 1. close this popup, which functions fine with onClick in the view and 2. reload the opener page of the popup after the called action in the controller is done. I tried: render :update do |page| page.opener.location.reload() end in the controller, but this didn''t work. Can anyone
2010 Jul 01
6
Close Modalpopup with RJS
hi guys: I''m scratching my head on this one: I have a twitter app where I''m trying to open a modalpopup with a twitter sign in, get them to sign in, then close the popup and refresh the main window. My code however refreshes the main window with the popup window result, which I thought was really strange: application.html.erb function OpenModalPopUP() {
2006 Jan 06
6
NewbieQ: How do I refresh view after return from popup window
Hi, I have this bitta code that is supposed to open a new window and allow the user to create a new Organisation on the fly whilst editing a new Person i.e. if the Organisation exists they can select it from the drop down select. Otherwise they can click on the cute button and enter a skeleton Organisation record. What I need to do next is refresh the drop down select on returno the new
2006 Jul 22
17
Problem getting form_remote_tag to work with image upload
Hey guys, I am trying to pass the parameters for the file being upload, but the params[] are not being passed. Ive read through some posts and realize this is an issue with RoR. I read through some of the posts and someone suggested using: http://svn.kylemaxwell.com/form_remote_upload/trunk/ I tried to install it, and although I thought I installed it correctly, it doesn''t work.
2006 Apr 09
4
Best RJS process for what I''m trying to do...
I just wanted to ping this off the list to get some advice since I''m now pulling my hair out. Thanks in advance for taking any time to look at this. It''s much appreciated. Now, my problem is my RJS is working but it''s not inserting how I want it to insert. I have a partial I''m rendering in my view that looks like this: <ul
2006 Nov 20
2
getting form content for print popup
I''m trying to open a new window for printing a form from a link. I want to display the contents of the form for printing. I can get the popup to work, but am wondering how to get the contents of the form from the parent window, using RJS. I can use a submit option to get the form parameters in a link_to_remote, but the popup doesn''t work. <%= link_to_remote
2006 Apr 11
12
RJS
I am trying to use RJS as shown in this tutorial : http://www.codyfauser.com/articles/2005/11/20/rails-rjs-templates However it does not seem to work. I am not getting any excpetions in the logs. Here is what the logs say : Parameters: {"action"=>"add", "controller"=>"homepage"} Rendering homepage/add The homepage/add is named add.rjs I know
2005 Dec 31
9
RJS Templates not conducting callbacks
I''ve run across a weird problem with RJS that I''m trying to figure out: I have an application that was running 0.13.1 that I recently upgraded to Rails 1.0. I wanted to use RJS templates, so I installed the plugin and updated my prototype javascript file via ''rake update_prototype.'' I attempted to test the templates out via the following code, but the AJAX
2006 May 25
13
.NET developer trying to understand some Rails basics
Hi All, I''ve been a ASP.NET developer for the last few years and consider it to be a pretty productive environment to work with. However, the object-relational mapping (ActiveRecord) and simplicity of the Rails framework and Ruby in general really appeals to me. .NET currently doesn''t have something like Rails'' ORM - atleast not out-of-the-box. Here''s my
2009 Aug 16
5
any help with captcha in my comments ?
this is my error: Processing ApplicationController#create (for 127.0.0.1 at 2009-08-17 00:57:56) [POST] Parameters: {"comment"=>{"name"=>"asdasd", "body"=>"asdasd"}, "commit"=>"Add Comment", "post_id"=>"19",
2006 Jun 15
11
Calling all of 7 million entries
Hi everyone, David R. here; I''m new to this mailing list but I''ve been incredibly wrapped up in Ruby on Rails for the last two or three months. I''ve built a fully functional web application and we''re about to roll it out to our customers. However, my supervisor would like to add just one more feature to it: listing the number of online users for a particular
2006 Jul 06
2
rjs rails to execute?
I have the following: layout: <%= javascript_include_tag :defaults %> [...] <div id="menu"> <div id="myrandom"></div> <%= render :partial => ''menu'' %> </div> menu partial: <%= link_to_remote "Generate Text", :update => ''myrandom'', :url => { :action =>
2008 Aug 24
11
link_to_function check javascript attribute
How could I check the value of an javascript object''s attribute? <div id="new_item_details" style="display:none"></div> <%= link_to_function("Show details...", nil, :id => "show_details") do |page| page.visual_effect(:toggle_blind, :new_item_details) if (page[:new_item_details].style.visibility ==
2006 Apr 27
7
RJS & Ajax question...
Hi, I''m trying to convert an older Rails application to use Ajax. I''ve already moved my edit and show actions so that, instead of displaying as separate pages, they appear in a <div> on my list view. However, I have two problems: 1) When the user saves the changes, I want to put all the ajax changes in an RJS template. However, form_remote_tag :url =>{:action =>
2006 Feb 08
3
Using shared RJS templates
I''ve got an action in my application controller that needs to call a shared RJS template. Typically it''s actually being called by subclasses of the application controller. I''ve tried this.. def action ...code.. render :partial => "shared/template" end with ''_template.rjs'' existing in the shared folder. The problem that crops
2006 Feb 08
3
RJS templates before, during and after
RJS templates are nifty. They let you put all sorts of fun effects all over your bland html pages without too much work. The link_to_remote function also lets you run scripts before, during, and after an AJAX call is run by using callbacks. There does not seem to be an equivalent method for running an RJS template before or during an action. Rendering it at the end is no problem. One
2006 May 25
5
Is there a way to abstract the updating of other parts of the page after an Ajax request without putting using the standard view file?
Hey all, I''d like to abstract the process of updating different portions of the page after an Ajax request has taken place. Rather than simply putting the extra view logic in the standard rjs template, it seems to give better separation if there is a split between the core view logic (ie, inserting a row in a table), and updating any associated portions of the page. Is this possible? I
2006 Apr 26
2
RJS and Greybox : executing the js in the parent window?
Hi all, Question: Can a child window manipulate its parent window with RJS? Example: In an application a parent/master window shows a list of records. When the users press ''edit'', a greybox windows pops up where they can update one item attributes. Problem: after the ''save'' and child window closing, the parent window still contains the old attributes
2006 Jun 27
2
Preloading results in Ajax App
Hello Rails lovers! I have a few general discussions that I have yet to find terribly active. Perhaps all of the people busy on this front are...uh...busy on this front. So! Ajax-only apps. No degration. Yes! Forget about degradation for a moment. Not willing to? Ok, well...this question is for those who are willing... Imagine developing an app that is one page - all actions render partials