similar to: Object finalization help

Displaying 20 results from an estimated 200 matches similar to: "Object finalization help"

2006 Feb 20
0
Object Finalizers help
Heya guys, This one is bothering me as its evading my eye. I''m trying to set a callback on finalization of an object, ie: a finalizer set through a plugin to the model. Example In Plugin: def acts_as_goat class_eval do ObjectSpace.define_finalizer(self, Proc.new {self.conn.close} ) end end class UberGoat < ActiveRecord::Base acts_as_goat end Anyways, it seems to not
2006 Jan 09
3
Include with two references of one model of the same table
Hey guys, I just came across this oddity, not sure what to make of it yet, but I think it might be incorrect behavior. When doing a @inst.find(:all, :include => ["hometeam", "awayteam"] ...) hometeam and awayteam are two references from a belongs_to that is of the same model and of the same table. I will get a pgerror stating that "matches", which is
2006 Feb 09
9
Looking for hosting advice
Hello everyone, I''ve got a Rails app that''s going to replace an in-house application, where the customers are used to having to deal with maintaining their own servers and data. As these are non-IT customers, maintaining servers and data is a long way from their core business and thus quite costly for them. I''m hoping to slice their costs by removing the requirement
2006 Jan 11
4
Code Shopping in Rails
Back in the horse-and-buggy days when I was cutting my OO eye teeth on Smalltalk, we had a LOT of conversations about the biggest problem dealing with a large and growing set of classes and methods in the Smalltalk image. It became clear that most, if not all, successful Smalltalk coders spent a lot of their time code-shopping, i.e., looking for a class or method that did something they
2007 Jun 18
0
Phoenix Rails Users Group
What: June Phoenix Rails Users Group When: Tuesday, June 19th, 6:30 pm - 9pm Where: Office of Integrum Technologies 290 East El Prado Court, Chandler, AZ (north-east of Arizona and Warner) Topic: Overview of alternative Ruby web frameworks ---- Please join us Tuesday evening at 6:30 pm for the Phoenix Rails Users Group. This month Josh Knowles and Jade
2006 Jul 13
0
AZ Ruby on Rails Community
If you are interested in learning about Ruby on Rails or are currently doing Ruby on Rails development this is a meeting you will want to attend. We will be having the first meeting this Wednesday July 19th at Molly Brannigan''s located at Val Vista and the US 60. Free wireless connectivity will be provided. The first part of the meeting will consist of introductions and feedback
2006 Jan 30
0
const_missing: uninitialized constant Test when running unit tests
I have a set of tests that run without issue on one machine. On another machine when running the same tests we get: /usr/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:200:in `const_missing'': uninitialized constant Test (NameError) from ./test/unit/../test_helper.rb:5 from test/unit/entity_test.rb:1:in `require'' from
2006 Oct 24
1
Broken thread Safe connection Management on Mysql (Mysql too many connections errors)
Hi, There is an issue on socket connection with backgroundrb (rev 47) and mysql backend: after a certain number of job you reach the mysql connection limit as socket are never closed and nobody can connect to mysql anymore till you stop the backgroundrb daemon. Already reported on: http://rubyforge.org/pipermail/backgroundrb-devel/2006-July/000066.html,
2006 Aug 10
4
exporting vcards from rails
i''m doing a site for someone that has a form set up to collect contact information from the user. i installed the vpim gem and was hoping to give my client a way to download all of the contact''s information as a vcard. using the examples, i was able to get it working in ruby, but i''m not quite sure how to generate and download a vcard on the fly. has anyone done
2006 Mar 05
2
ActiveLDAP maintain user connection
Hi, I''ve just started to do some work using ActiveLDAP and Rails. I''ve managed to get some basic login code that works to authenticate users, but I would like to be able to maintain that connection for the User Model so that the ACL''s in LDAP for each user will be used correctly as the various controller queries are made. I haven''t quite sorted out how to
2005 May 08
1
ruby destructor hooks
Hi Is there a way of finding out when or whether the wx object referenced in ruby is still alive? Here''s my problem # register that +wx_control+ should update on application events of type +event_type+ def add_subscriber(wx_control, app_event_type) @subscriptions[app_event_type].push(wx_control) end # later def broadcast(app_event) @subscriptions[app_event.type].each { |
2007 Mar 29
21
a better "should have valid associations"
This is pretty much the same as last time around, if you recall. Thanks to Wilson for converting to the new form. I''ve added a few lines. Basically, it iterates over your model associations and does two things. - First, just try to call the association. Usually fixes speeling erors or other such silliness. - Second, try to find a record with an :include on the association. This
2006 Feb 19
2
New version of Selenium on Rails
I''ve just released a new version of Selenium on Rails[1]. It''s a plugin that makes it easy to test Rails applications through browsers using Selenium [2]. The major new features are exprimental support for running all tests through a Rake task (which launches any number of browsers) and a new format RSelenese. The Rake task has a few rough edges so I would appreciate if
2007 May 27
12
Checking for Range
how would you check for a range using rspec? person.password.range.should == Range.new(5..40) <- this doesn''t work -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rspec-users/attachments/20070527/4d8cb007/attachment-0001.html
2005 Nov 10
0
OggPCM version / header finalization
John Koleszar wrote: > I have OggPCM (as currently defined) support implemented in mencoder and > mplayer. I'd like to request that we settle on modifications to this > header by the middle of next week or freeze the current header as the > official major version 1.0, so I can get the patches cleaned up and > released. One week is very little time to get public comment
2005 Nov 10
0
OggPCM version / header finalization
>>1) What are we trying to achieve with the "source-ID"? >> >Basically I was trying to provide a method where a logical bitstream >could contain only a subset of the total number of channels of the >source. <...> >I know that splitting a source up across multiple logical streams is >ugly, but I can't think of any clean way to provide multiple
2005 Nov 10
0
OggPCM version / header finalization
I take it you are talking about what is listed under alternative format ? If you have an implementation... you must have a list of enumeration fields... could you put them on the wiki. If we are asking for final comments... the wiki should be tidied up. The original format removed if the general consensus is that this is more on the right track... which it looks to be. Zen. ----- Original
2001 Jul 10
1
Object finalization
I see some code in R to attach finalizers to external pointer references (Register[C]Finalizer). Anyone have an example of how to code the finalizer? R_RegisterCFinalizer accepts a C function, but I can't see how to get it to operate on the pointer, since the pointer is not passed to the function when its called. RegisterFinalizer takes an R closure, but how is it called from R (tried
2004 May 03
1
Finalization and external pointers
I'm adding things to the Windows RGui so that there's more control of the interface from within R. One thing I'm considering is giving access to the Graphapp window objects using external pointers. This raises the issue of finalization on both sides: - If someone creates a pointer referring to a window, then that pointer should be changed to NULL when the window is closed. - If
2001 Mar 01
0
Finalization and external pointer objects
Hi, I've been developing an image analysis package based on R for a while now and I've had problems relating to garbage collection, so it with great interest that I've noticed the work done by Luke Tierney in this area, and I'd like to discuss how best to fit it into my package. I'll start with how my package is structured - an image is represented by an integer with a class