search for: generatormethod

Displaying 14 results from an estimated 14 matches for "generatormethod".

Did you mean: generatormethods
2006 Jun 30
6
using rjs
Hi I am relatively new to ruby on rails. I want to use this javascript bundle: http://prototype-window.xilinus.com/index.html How would I call those functions in an rjs file? example: win = new Window(''window_id'', {title: "Sample", top:100, left:350}) win.getContent().innerHTML = "<h1>Hello world !!</h1>"; win.setDestroyOnClose();
2006 Jun 27
4
RJS Form Values
Hi, I have the following code : <%=link_to_function("? | China", update_page{|page| page[''tags_en''].value = "China" page[''tags_ch''].value = "?" }) %> This updates two text fields with the China and ?. However I want to append the values, not replace them. So I need something like this :
2006 Jul 20
5
RJS where to put helper method?
Hi, If I want to have helper method for my rjs, where''s the best place to put it? so for example: --- bla.rjs: page.replace_html ... page.visual_effect ... --- somewhere: (currently I put in application_helper.rb) def replace_with_effect(page) page.replace_html ... page.visual_effect ... end --- bla.rjs: replace_with_effect page and is there a way to define the helper so we
2006 Apr 07
6
Multiple view types for a single action?
Is it possible to have more than one kind of view for a specific action, for example an .rhtml and a .rjs file to handle the view for the same action? I suspect not, but this makes me wonder if there a way to call the .rjs file from within the .rhtml so the statements within it get executed? Thanks, Andy
2006 Aug 10
2
Is it possible for a controller to throw up a message box?
I need my controller to give some feedback to the user by popping up a message box. Does anyone have any ideas how this can be done? Thanks --John -- Posted via http://www.ruby-forum.com/.
2006 Jun 02
1
Ajax: update multiple DIV''s
Hello. Is it possible to update multiple DIVs during? For example I have DIV for @flash[:notice], and one for content and I need to render both DIVs after executing action.
2006 Apr 03
1
Q: periodically_call_remote ( how to make it execute just once? )
I posted this ealier on the web forums but noticed a similar question about this function and one user responded to try this list instead. If anyone can help I would greatly appreciate your suggestions. Q: Is there a way to use periodically_call_remote to run just one time instead of every '':frequency'' seconds? I tried putting the call inside the div container thinking it
2008 Jan 15
2
rails rjs page object
Can anyone point me to api documentation for the page object that is used in rails rjs files? Thanks --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send
2006 May 17
4
.rjs templates undesiered output problem
Hello everyone, I am working with rjs templates in rails, and I''m amazed of how simple it is to generate code with ajax, however I''am having some troubles and I can''t seem to find a way to solve''em. Whenever I put some code in the template, let''s say: page.visual_effect :highlight, ''sitio37'', :duration => 3 I get the
2008 Nov 22
3
RJS page.update question
How does page.update actually work? I know its a wrapper for Prototype.update but how does it get the partial in there? Say I wanted to update a div with the contents of a partial manually like this. content = render(:partial => ''whatever'') page.call "$(''my_div'').update(#{content})" But his does not work. It keeps giving me weird errors about
2012 Sep 22
4
Class, Module, Object
>> reload! Reloading... => true >> puts Class < Module true => nil >> puts Module < Class false => nil >> puts Module < Object true => nil >> puts Object < Module false => nil >> Object.parent => Object The above indicates that the Class object instance inherits from the Module object instance and the Module object instance
2006 Aug 01
6
Getting Started on RJS Templates
I definitely need to use RJS templates for my current application. I''ve used Google for the past twenty minutes or so, yet I can''t find a good resource that will get me started and show me what the page object can do. Any links? When an Ajax link is clicked, I''m trying to change the background of a "primary" list item, as well as the background and text of
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
2010 Feb 20
23
Rails 3 possible bug in Routing
Hi, I just ran into this ActionController::RoutingError and just wanted to check if someone can confirm this as a bug in the Rails 3 beta gem. config/routes.rb contains: get ''login'' => ''session#new'' post ''login'' => ''session#create'', :as => :login GET /login works fine: Started GET