Displaying 8 results from an estimated 8 matches for "heisters".
2008 Mar 07
6
creating a model registry
Hi all,
This is a problem I''ve approached so many times and always worked
around, that now I want to solve it once and for all. Say I have
something like this:
---
class X < ActiveRecord::Base
acts_as_wacky
end
module Wackinator
class ControlAllWackos
@@wackos = []
def self.kill_wackos
@@wackos.each(&:kill)
end
end
def acts_as_wacky
2008 Feb 18
6
inheriting static/class methods with new prototype.js class creation
Hey all.
I want something like this to work:
var Foo = Class.create();
Foo.myStaticMethod = function(){alert("I''m a static method!")};
Foo.myStaticMethod(); // works
var f = new Foo();
f.myStaticMethod(); // doesn''t work, but that''s good--I don''t want it
to
var Bar = Class.create(Foo);
Bar.myStaticMethod(); // doesn''t work, undefined :(
2005 Jul 06
2
Samba LDAP timeout
...ct on the
connectivity.
Is there a related configuration setting that I'm overlooking? Samba /is/
compiled to use ldap:
$ ldd /usr/sbin/smbd | grep ldap
libldap.so.2 => /usr/lib/libldap.so.2 (0xb7fb1000)
Any help on this matter would be greatly appreciated. Thanks much.
-Ian Smith-Heisters
--
http://www.0x09.com
2008 Mar 19
2
nil-error
Hi all,
I''ve got the error below in my backgroundrb_debug.log. I''ve tried to
reproduce the error in the development environment, but the only way I
can get the same thing is by calling ask_work with a bogus worker
name. Calling it with the production code causes no error.
Here''s an example of what the code calls:
MiddleMan.ask_work(:worker => :agronomy_worker,
2008 Feb 12
0
acts_as_paranoid: has_one_paranoid
Hi all,
Ran in to a problem with AR::B#find(:include) and acts_as_paranoid,
well described here:
http://www.ruby-forum.com/topic/57945
So I whipped up this thing, which seems to work for me:
module ActiveRecord
class Base
def self.has_one_paranoid(*args)
ref = create_has_one_reflection *args
cond = args.last[:conditions]
cond = cond.blank? ? '''' : cond
2008 May 30
0
silent rake test failure--doesn't happen on manual test run
Hi all,
This is kinda weird. I''m working on a plugin. On the same computer
(eg. same gems, ruby, etc.), installed into different apps, it fails
silently in one, but works in the other. The code is identical, since
it''s exported through an svn export.
on app a, it works:
---
$ svn up
At revision 1191.
$ rake
(in /home/.../vendor/plugins/acts_as_media_file_manager)
2009 Jan 13
0
optional authentication and HTTP Basic
Hi all,
I have an app that originally only supported form-based
authentication, and showed pared-down content to unauthenticated
users. I then layered on HTTP Basic authentication using
authenticate_with_http_basic, which worked fine for scripts like LWP/
wget/curl.
However, some web browsers refuse to submit credentials in the URL
(eg.
2008 Feb 04
0
gettext and acts_as_paranoid gives stack overflow
HI all,
I just started using acts_as_paranoid, and I''ve been using gettext for
a while. Now I get the below errors when I run rake gettext:updatepo.
It''s interesting that the errors seem to stack up, so the first file
just errors on belongs_to_without_deleted, the second file has a layer
of eval, the second has two layers of eval, and so forth.
I''ve tried for a while