similar to: Need help refactoring a controller, perhaps add threading?

Displaying 20 results from an estimated 10000 matches similar to: "Need help refactoring a controller, perhaps add threading?"

2008 Mar 14
8
Facebooker updates
I just went through and cleaned out most of the bugs and patches. I also added a facebooker.js file that implements enough of prototype to do $() and link_to_remote with :update and remote_form_for with :update Let me know if you run into any issues with it. Mike -- Mike Mangino http://www.elevatedrails.com
2006 Apr 05
7
Conditional toggle button
I have a link_to_remote that updates the content of a hidden div and makes it appear.. But I want it to hide the div and not execute the link_to_remote function on the second click. What''s the best way to do this? I''m thinking I can do it in RJS maybe, but I''m not sure if there''s a nice Rails-y way to tell if a div is hidden or not.. I''d also
2006 Jul 09
6
ajax effects
Hi, i was wondering if there was some kind of general line of code i could add to my application, anywhere i suppose, that would generate some kind of effect to notify the user that an effect is happening...it could be a box on the top of the screen or something, that would be like the small bar at the end of the browser that shows the user the status of a loading page ... i was hoping
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
2005 Oct 17
7
Ajax.MultiUpdater ?
Hi, I''m using prototype within ruby on rails. One limitation I''d like to overcome is the restriction of beeing able to update just one html elements content using from_remote_tag or link_to_remote. AFAICS this is just a restriction of the form_remote_tag/link_to_remote implementation and it''s underlying Ajax.Updater class. Right? In theorie there should be no problem,
2006 Jun 21
2
Using RJS to highlight one LI if using insert_html on an UL?
It seems common to use RJS for quickly adding and highlighting a list that is having content added to it like this: http://rafb.net/paste/results/Z3m32g48.html ... where "my_list" would be an UL and the partial would insert a LI. Given that example, is there an easy way to highlight only the newly inserted LI instead of the whole UL? The only way I can see to do it is to give
2008 Mar 24
2
link_to_remote and restful routes/urls
is there a way to access a restful resource with mike''s new link_to_remote helper? something like: <%= link_to_remote h(user.name), :update => "div_id", :url => user_url(user) %> of course, that doesn''t work. i have also been trying things like: :url => controller.asset_host +
2007 Mar 23
11
Is there such a thing as button_to_remote?
I''ve changed my destructive link_to statements in favor of button_to. But what if I want to make an .rjs call with that button? Seems like we need something equivalent to link_to_remote, so that the button can make an ajax request instead submitting the form. Or am I missing the point entirely? Jeff --~--~---------~--~----~------------~-------~--~----~ You received this message
2006 Jul 20
5
Need HELP changing link_to_remote to a button
I would really appreciate some help with changing a link_to_remote call to a button of some sort. Here''s a little background. On the page there are two <div>s. One is a form that lets the visitor enter items. The second <div> is where the entered items get displayed, each in it''s own item <div>. Each item <div> has two <span>s. The first one
2006 Jul 21
10
Using an image button for "link_to_remote"
All, I want to do an AJAX request using a custom image button. I currently have this as a standard button action using "button_to". What I need is the button equivalent of "link_to_remote". Is there a helper that I can use, or do I need to build it by hand? I see button_to_function(), but that sets me up to call a Javascript function, not post to a Rails action. Or can
2006 Apr 27
4
select item based on previous select list selection?
So I have a select list with a list of items. When a user selects an item, another select list should have its default selected item set to a specific item (the default associated with the first select list). This is in a form to create a new task. The first select list is a list of parent tasks. When one selects the parent task, the clients select list must default to the same client as its
2006 Apr 16
11
RJS templates not found
I am running Rails 1.10 and wanted to check out the RJS templates. Rails doesn''t seem to find them. I did issue the rake comment update_javascripts and that did not correct the problem. RJS is part of 1.1 right? Any ideas? Thanks. -- Posted via http://www.ruby-forum.com/.
2006 Apr 27
12
Execute controller function from RJS
Hi all, I wonder if it is somehow possible to execture or redirect to a controller function from RJS? Right now I do: def foo() render :partial => ''executeagain'' end _executeagain.rhtml <script> new Ajax.Updater(''elmntID'', ''/test/foo/'', {evalScripts:true}); </script> This will loop I know :) How can I achieve the same
2006 Mar 24
3
ajax response event ? (Should be easy..)
How do you call a javascript function to do something when the response is returned to the visitors browser? Easy ey? //Daniel -- Posted via http://www.ruby-forum.com/.
2006 Apr 21
3
rjs in multiple ajax page
Sorry for the long explanation but I''m having trouble integrating rjs into my form page. Here''s my page: <div id="posts"> <ul id="post_list"><%= render :partial => ''list_results'', :collection => @posts %></ul> <p><%= link_to_remote(''+'', :url => {:action =>
2006 Apr 04
7
Not getting the whole RJS-based partial rendering concept ...
I have been trying all kinds of different ways to produce what I think should be a simple effect, but have not had any luck yet and apparently I am not following the general idea... What I am trying to accomplish is the following (part 1 works and part 2 does not): 1. One of my views has a link_to_remote which updates a div container with a table of data my example is <div
2006 Apr 28
4
can someone help DRY a noob? thanks...
hi all i''m trying to pass a variable name right round the block and need a hand to ease my aching brain. ##in my sidebar i have <li><%= SidebarItem(''catalogue'') %></li> <li><%= SidebarItem(''provenance'') %></li> <li><%= SidebarItem(''status'') %></li> ##linked to a
2009 Jul 24
5
padawan seeks advice from jedi masters to create toggle box via ajax/rjs before slitting wrists with ruby powered light-saber.
I AM TRYING TO MAKE A DAMN TOGGLE BOX, BUT USING MY OWN GRAPHIC AND HAVING THE MOUSECLICK TRIGGER BOTH SWITCHING THE GRAPHIC (via AJAX) AND SAVING THE STATE IN THE DATABASE. I GOT IT ALL WORKING WITH NORMAL HTML GET CALLS TO THE SERVER, BUT I NEED IT TO BE AJAXIFIED SO THAT THE PAGE DOESN''T RELOAD. AND TO COMPLICATE MATTERS, IT HAS TO WORK IN A TABLE WITH AN ARBITRARY NUMBER OF ENTRIES,
2006 Apr 07
3
RJS removing content of div, but not div itself
Hi, I''m creating a list of ingredients on a page. When the user clicks the ''Add Ingredient'' button a record gets added to the db and the ingredient gets added to the page. On the page, each record is represented by a <div> with three <span>s inside. One of the <span>s has a link_to_remote to ''delete'' the ingredient. When the link
2006 Apr 28
10
Sharing RJS Templates
Hello All, I''m enjoying the simplicity and power of RJS templates in Rails 1.1, but am perplexed about sharing them. I have several templates that I would like to access in various controllers, but if I moved them to views/shared/whatever.rjs, my app can''t seem to find them. I changed the name to _whatever.rjs and referenced them as "shared/whatever", but no luck.