similar to: How to manage one to many within application.

Displaying 20 results from an estimated 100 matches similar to: "How to manage one to many within application."

2006 Apr 16
5
Newbie Problems with pluralization
Hi, I have a many to many relationship incorporating the following tables: taxes --> taxes_tax_groups --> tax_groups I have a model named tax with the following declaration: has_and_belongs_to_many :tax_groups and I have a model named tax_group with the following declaration: has_and_belongs_to_many :taxes I am attempting to run the following unit test: require
2008 Feb 01
1
render partial in div
I have this link which when clicked will loop and render more links and a form from a partial inside of "myDiv": <%= link_to_remote ''MyLink'' . . . ., :update =>"myDiv" %> <div id = myDiv> <div> <div> <div> What I am trying to do is have a form_remote_tag that re-renders the list of stuff in "myDiv" when
2006 May 05
0
Node wrapping, node replacement, magic buttons...
Hey all, I was wondering if any of you has done any thing allong the lines of node wrapping? For example, lets same I have a document containing: <span id="myElement">My element text</span> And I want to wrap myElement with another node like this: <div><span id="myElement">My element text</span></div> The only solution I found was
2006 Jan 11
0
AJAX: link_to_remote problem
I use: <%= link_to_remote("Update", :update => ''mydiv'', :url => { :action => :create, :host => ''rails'' }) %> which generates the following: <a href="#" onclick="new Ajax.Updater(''mydiv'', ''/account/create'', {asynchronous:true, evalScripts:true}); return
2006 Jan 26
0
cloneNode not draggable in IE
Here''s the problem: I have a div, id=mydiv, which I clone using: var clonedDiv = document.getElementById(''mydiv'').cloneNode(true); I then set the id to be mynewdiv: cloneDiv.id = "mynewdiv"; //not using setAttribute to accomodate IE I then remove the original div: Element.remove(document.getElementById(''mydiv'')); I then insert the new
2006 Apr 19
9
Initial load time when periodically_call_remote
When I do periodically_call_remote with e.g. :frequency => 30 after initial page load I have to wait 30 seconds until this partial renders first time. Does anybody know how to make ROR to render partial on web page load, and then start periodic calls every 30 seconds? I tried to put <div id=''mydiv''><%= render(:partial, :action=>''myaction'')
2015 Oct 14
3
Strange indexing behavior on HTML emails ..
Hi, In continuation to the issue I had posted about long back: http://www.dovecot.org/list/dovecot/2014-August/097362.html I did further testing today on a fresh new Debian & latest Dovecot and observed a undesired behavior. I am using fts_lucene & following sequence of commands on a empty test account me at myself.com: doveadm expunge -u 'my at myself.com' mailbox
2006 Mar 20
1
AJAX in conjunction with partials
All, Trying to clear up some confusion on my part. If I make an Ajax call using Ajax.Request and in the controller method that I call, I do a render (:partial => ''whatever.rhtml''), should I expect that ''whatever.rhtml'' will be rendered in the browser or not? Put another way, is it in any way reasonable for me to think that Ajax.Request + partial render
2006 Apr 27
14
cleanWhitespace and parentNode
Hey cats, I seem to have ran into a problem in IE trying to use parentNode with the cleanWhitespace method. doing something like: var div = $(''mydiv''); Element.cleanWhitespace(div); works really great, but try doing: var div = $(''mydiv''); Element.cleanWhitespace(div.parentNode); or var div = $(''mydiv''); div = div.parentNode;
2006 Aug 03
0
link_to_remote() question from a newbie.
Hello, I am trying to utilize link_to_remote() in the following manner: <%= link_to_remote(exchange.name, :update => ''mydiv'', :url => { :controller => ''attributes'', :action => :list_user_attributes, :class_id => class.id, :user_id => user.id } ) %> And
2006 Apr 09
1
RJS across iframes
I have an inline iframe which has a form in it, when the form is updated, I would like to call an RJS template that will update the parent page. +-----------------------------------------------+ | | | <div id="mydiv"> Update with RJS </div> | | | |
2006 Feb 26
0
Ajax, MemoryStore and sessions
Have you ever worked with Ajax, memoryStore and sessions in Rails? I''m trying to pass a value through a session variable to various methods. I''m calling the methods with Ajax on a submit button. I do this twice on a page. The first time I pass a variable from the page to the controller and store it in the session and write a log entry. This works fine. When the second button
2006 Mar 23
2
ajax replace div
Hi, Using form_remote_tag methode, is there a clean way to directly replace the content of a given div instead of just update it ? If I destroy the content of the div using this code: :success => ''$(\''mydiv'').innerHTML = \''\'''', It works. But it''s not really a clean way... Any suggestions are very welcome.. Thanks. Seb
2009 Apr 27
5
ruby jasper report
Hi, I am trying to create a pdf using ruby jasper. For this I am referring this url:- http://oldwiki.rubyonrails.org/rails/pages/howtointegratejasperreports I have done everything whatever is in that link. Still I am not able to get the pdf. I am not getting any error in log file. My log file is:- "Processing AccountController#customer_report (for 127.0.0.1 at 2009-04-27 13:19:34) [GET]
2008 Jan 22
3
dynamic table/adding rows in IE using 'new Element("tr")'
I''m trying to create a few menus using prototype.js "insert" function. I create a table using ''new Element("table")'', insert it in DIV and then add links - one row per link (or the other way round - create a full table, then insert it). I initially wrote a code that worked fine in Firefox, but did not in IE (currently testing with 6.0): function
2005 Nov 17
1
afterFinish option not working as expected
Hello, I''m trying to use the afterFinish parameter on the BlindDown effect, but it''s not working as I expect it to. My function appears to be called just as the effect is starting, not when the BlindDown is complete (finished drawing). Here''s the code that I''m using for the most part... Effect.BlindDown( mydiv, { afterFinish:Form.enable(myform) } ) Any
2009 Apr 28
0
Writing an imgae tag in to_xml
Hi, I am trying to create an pdf report by using ruby jasper pages. For that I have written customer_list.rxml file like this: xml.instruct! xml.customer_list_result do xml.invoice_customers do @customers.each do |customer| xml << customer.to_xml(:dasherize=>false,:skip_instruct=>true,:only=>[:id,:name,:city],:root=>"customer") end end end I want to
2006 Feb 10
1
Stopping an observe event
If I want to stop observing a div Is this the format? Event.stopObserving($(''''mydiv''),''click''); Deco
2006 Feb 01
1
Combine Ajax call with an effect.
Hello list. I am a newbie with prototype, scriptaculous and with JS. Right now, I have a successful ajax call that appears in my div (thedescription) when I mouse over the link, and disappears when I click on the link. What I would like to have happen is to combine this with an effect (ie, onclick="new
2006 Jun 12
0
Passing parameters to ''remote_function''
Hi, I am trying to use the ''remote_function'' helper method from the PrototypeHelper class on a the onblur event of a text_field for filling a form with data via AJAX. How can I get the value of the text_field for making a query to the database in the controller action? <%= text_field("item", "code" , :onblur => remote_function(:update =>