similar to: Polymorphic Association?

Displaying 20 results from an estimated 80 matches similar to: "Polymorphic Association?"

2006 Mar 19
2
Multiple polymorphic belongs_to declarations
I have the following models: class Card < ActiveRecord::Base belongs_to :deck belongs_to :front, :polymorphic => true belongs_to :back, :polymorphic => true end class TextContent < ActiveRecord::Base has_one :card, :as => :front has_one :card, :as => :back end The conflicting has_one declarations don''t work. What I need is
2008 May 19
6
obtaining table cell text data
I''m writing some code to subset a table based on the contents of particular columns. My event handler starts off like this: subsetChange: function(e) { var subset = $F(''subsetSelector''); var rows = $$(''.content-row''); rows.each(function(row) { var value = row.down(''.Platform_Category'').childNodes[0].data;
2006 Mar 17
10
good javascript xml parser
Anyone know of a javascript function that will take an xml document and turn it into an associative array? Basically it would take something like this: <body> <item> <id>1</id> <name>Bob</name> </item> <item> <id>2</id> <name>John</name> </item> </body> And turn it into something like this: {
2006 Mar 17
6
Updated the xml code to be more object-oriented
I changed the code to be more prototype-esque, and created a class called XMLDoc. I may add more functionality to it later, hence the more generic name, but you do something like this to convert XML to a hash: XMLDoc = Class.create(); Object.extend(XMLDoc.prototype, { initialize: function (xmlDoc) { this.element = xmlDoc; }, asHash: function () { if (! this._xmlHash) {
2007 Aug 21
1
handling of dynamic filecontent creation
Hi list! In the light of my personal "Simon is dumping his problems on others"-week I have a question regarding.. dunno.. generally "handling of dynamic filecontent creation" I think is the best to describe it: We use a lot of in-house built services (for arguments sake webservers) which are instantiable and bring their own "framework" for setup, so I created
2007 May 29
0
STI and Active Record
Hey, I''m trying to use STI in my models, while writing a little cms. A have a model called Page and some subclasses like ContentPage, Sysfolder etc. Some classes share similar attributes, so I use STI and one table for all types. Now I''m writing a form for edititing a page and I want to have the opportunity to change the type of it at runtime. But that seems to be a problem:
2009 Jan 29
6
Control Characters
I am attempting a text editor using wxRuby. I''m having character issues. Strings are not binary-safe. Some characters are not allowed. - newline / line feed (\n), tab (\t) are displayed - carraige return (\r) is stripped - Other control characters and high-ascii cause control values to become empty. Affected controls include: Wx::TextCtrl, Wx::StaticText, Wx::Clipboard, et al. Most
2003 May 23
0
LDAP tools for SAMBA 3.24 corrected
Sorry this is the complete patch -- ---------------------------------- ALEJANDRO SOLER e-mail: asoler@martinaditrento.com Administrador de Sistemas Martina di Trento S.A. Buenos Aires - Argentina Tel.:(5411) 4611-2730 WEB: http://www.martinaditrento.com ----------------------------------- -------------- next part -------------- --- samba/smbldap-tools/smbldap_tools.pm 2002-06-01
2006 Jul 05
13
interactive web app
I have an arbitrary program written in any language, and it is a binary (ie foo.exe), that will print out output to stdout constantly every 3-5 seconds. Is there a way that I can have a web application designed in rails that will print the output of this program to the browser every 3-5 seconds in realtime, preferably even in an ajax manner. thanks -- Posted via http://www.ruby-forum.com/.
2013 Feb 20
2
exten => h,n,AGI(generateCall.php,${NEXT})
not able to run my php from AGIi am using asterisk 1.8.13 (debian)i am able to make call file using php command line..but when executing php from AGI, it is not working..kindly see the attachment if bellow text is not readable...___________________________________________________ File: /etc/asterisk/extensions.conf[call]exten => call,1,Answerexten => call,n,Playback(hello-world)exten =>
2002 Nov 15
1
FW: How to configure Unix file mode on NT/2000 file transfer
I could not find this in the list... How can I configure Samba (I'm on 2.2) to automatically strip those pesky ^M character (DOS newline) when I share a Unix/Solaris slice to NT. I'd like to be able to copy files back and forth and not have to edit the files and strip out the control-M characters in my files on Unix. Any ideas? Thanks, Tom
2003 May 23
0
LDAP tools for samba 3.24 schema
For scrips smbLDAP from idealx apply this patch to smbldap_tools.pm, to use with samba 3.24 schema. Regards --- samba/smbldap-tools/smbldap_tools.pm 2002-06-01 06:30:48.000000000 +0200 +++ smbldap_tools.pm 2003-05-23 13:43:53.000000000 +0200 @@ -31,6 +31,16 @@ use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); use Exporter; $VERSION = 1.00; + + +# Put your own SID, this section
2006 Mar 23
4
XML parser fixed
Hi, I changed the XML parser who have been write by Greg (Gregory Hill) and changed some things. It did not work in IE and Safari and opera. I fixed some bugs. Now it works fine in IE, Safari, Firefox and Opera. /* --------------------------------------- */ XMLParser = Class.create(); Object.extend(XMLParser.prototype, { initialize: function (XMLFile, options) {
2007 Nov 23
3
call model method out of the controller => undefined method
Hi, I''m a newby and I fight with the Rails convention - i think so. I''ve done little tools and scripts in Ruby before. I''ve successfully uploaded a textfile. And now i want to extract some filecontent to pass it into a database. My Problem: I can not start a given method of a given Model (=> Metadata.extract_content(fileuri)). The error message ''undefined
2011 Jun 29
0
XML parsing
Hi, i want to parse a XML-File. I made some Tutorial but with my special Format it don't work. An Example of my format: <?xml version="1.0" encoding="ISO-8859-1"?> <mzML xmlns="http://psi.hupo.org/ms/mzml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://psi.hupo.org/ms/mzml
2007 Sep 10
2
IO errors with 2 processes
Hi All, I''m using acts as ferret and getting a lot of these errors: ---- Error occured in fs_store.c:324 - fs_open_input couldn''t create InStream /var/rails/projectblue/website/public/../config/../index/production/content_page/_347i.fdt: <No such file or directory> ---- and also some of these errors: ---- uninitialized constant Ferret::Index::Index::LockError
2007 Aug 22
6
Re: [puppet] #779: access to inherited variables from within a template
puppet schrieb: > #779: access to inherited variables from within a template > -----------------------------------------+---------------------------------- > Reporter: simu | Owner: luke > Type: enhancement | Status: new > Priority: normal | Milestone: >
2018 May 29
2
CentOS 7 issues with pdf manual / tex conversion
On 29 May 2018 at 16:37, R P Herrold wrote: | On Tue, 29 May 2018, Dirk Eddelbuettel wrote: | | > On a CentOS 7 machine, I am at a loss with respect to an inability to run a | > full R CMD check as anything involving tex files ends in tears. | | Hi, Dirk | | Have fun at the upcoming conference at UIC | | I seem to have 56 font packages installed under CentOS 7 | locally, but then I work
2018 May 30
0
CentOS 7 issues with pdf manual / tex conversion
On 05/29/2018 04:53 PM, Dirk Eddelbuettel wrote: > I noticed it with a local, not-public package -- but it appears to apply with > any source package. I replicated with pkgKitten straight off CRAN and after > checking that it has a six page manual there. I'm having trouble reproducing this one. In my fresh CentOS 7 VM, I can pull the pkgKitten source down, and run R CMD Rd2pdf
2018 May 30
2
CentOS 7 issues with pdf manual / tex conversion
Tom, On 30 May 2018 at 11:34, Tom Callaway wrote: | On 05/29/2018 04:53 PM, Dirk Eddelbuettel wrote: | > I noticed it with a local, not-public package -- but it appears to apply with | > any source package. I replicated with pkgKitten straight off CRAN and after | > checking that it has a six page manual there. | | I'm having trouble reproducing this one. In my fresh CentOS 7 VM, I