Displaying 20 results from an estimated 1000 matches similar to: "Re: Problem with overriding rails accessor methods"
2006 Feb 20
0
Override automatic accessor for reference field in model
When a column in a database table is actual data, rather than an fkey to
another table, I can override the automatic accessor by just doing the
following:
def field_name
# do something here
read_attribute(field_name)
end
This does not seem to work for me if the field is an fkey, say user_id,
linking to another table. I''ve made this work by aliasing the accessor
like this:
alias
1999 Dec 16
0
explorer freezes on right-clicking .exe's
I'm using samba 2.1 pre-alpha. When I right click an .exe file on the
most shares, explorer freezes, and must be killed to recover. The
problem doesn't show up on the home shares, but appears on any other
shares I create. I've experienced this problem on many different
workstations. Looking at the logs, it seems to be a problem with
oplocks; the part of the log that seems to apply is
2008 Jan 08
0
PwrGSD
Hello List:
Please find uploaded to CRAN a new package, PwrGSD
The package is intended for the design and analysis of group sequential trials
There are two main functions,
(1) GrpSeqBnds: computes group sequential stopping boundaries for interim
analysis of a sequential trial based upon a normally distributed test
statistic. This can be done via the Lan-Demets procedure with
2008 Jan 08
0
PwrGSD
Hello List:
Please find uploaded to CRAN a new package, PwrGSD
The package is intended for the design and analysis of group sequential trials
There are two main functions,
(1) GrpSeqBnds: computes group sequential stopping boundaries for interim
analysis of a sequential trial based upon a normally distributed test
statistic. This can be done via the Lan-Demets procedure with
2005 Apr 21
0
Viral activitiy coming from an IP in your network.
Hi, my name is Grant Taylor. I am a subscriber to the LARTC mail list lartc@mailman.ds9a.nl. The LARTC mail lists has been plagued with viral email coming from changing IPs in your one of your subnets. Based on the fact that the WhoIs information below says that the subnet in question is a dial up pool this would explain the changing IPs. In less than 6 days the list has received 14 viral
2006 Jan 14
0
Overriding column accessors?
Hi,
Is it possible to override the default accessors that are created by
Rails? For instance I had this User object which has the column headings
"password" and "salt" in its SQL table.
I did manage to override the setter accessor for password by using def
password=(new_password), but when I tried doing the same for the reader
by using a def password method (to return a
2009 Jan 26
1
ups emerson liebert GTX2 ESP-II serial protocol demo
2009/1/22 Spiros Ioannou <sivann at gmail.com>
> Cher Arnaud,
>
Hi Spiros,
> I send you a demo that reads info from an Emerson Liebert
> GXT2-10000T230 through the RS-232 port. This uses the "ESP-II (ESP 2)
> Protocol".
> Current supported data includes: measurements (voltage, temperature,
> etc) , ID strings (serial number, etc), status flags (inverter on,
1999 Jun 02
0
ACI appraisal program "freezes" when accessing SAMBA shares
Hi all,
Our company uses a buggy piece of appraisal software called ACI Rapid
Report. We recently switched from Netware 3.1 to Samba 2.0.4b for
file serving, and since then have been unable to create new documents in
ACI.
Before creating a new document, ACI forms a list of all .aci files in the
"data" directory. Locally, this takes a few seconds. On Netware, it took
about a minute.
1999 Jun 07
0
unix_convert cause of windows freeze?
Hello,
I've got an application, ACI Rapid Research for Windows, which is causing
me a ton of problems under SAMBA. When the program goes to create its own
list of valid files to work from, it ends up calling unix_convert on each
file in the directory. The problem is that unix_convert then goes and
calls name_map_mangle() twice for every file in the directory -- and I've
got 3025 files.
2007 May 06
1
validates_uniqueness_of (with :scope) doesn't seem to work?
I have a master record called ''project'' and a child record called
''agycode''. Obviously, agycode has a project_id FK. I wish to make the
"descr" field unique ONLY within the ''project_id'' ''scope''. Here are the key
pieces of information
Agycode fields (id, project_id, descr)
Here''s the declaration in the
2006 Jun 09
0
partials and rjs
I must have a misunderstanding of partials, maybe one of you can help me
out. I have a page that initially displayed via the following:
<-- in controller -->
def find_areas_for_country
@country_areas = CountryArea.find(:all, :conditions => ["country_id
= :country", params], :order => "descr asc")
render :partial => ''country_area''
2007 Nov 18
0
Trouble overriding default accessor/mutator
I have a database column storing a duration value as a number of
seconds, but I''d like users to be able to see it and edit it as a time
value. I am trying to override the default accessor/mutator for the
attribute and do the conversions there, using something that looks
like:
def duration
Time.at(self[:duration].to_i).getutc
end
def duration=(value)
self[:duration] = value.to_i
2010 Jul 19
3
ActiveRecord override
Would really appreciate it if someone could tell me why this is happening:
I override ssn method of AR class so I can encrypt/decrypt to/from the db:
class Person < ActiveRecord::Base
def ssn=(value)
write_attribute(:borrower_ssn, Crypto.encrypt(self.encryption_key,
value))
write_attribute(:borrower_ssn_final_four, value[5,4])
end
def ssn
# this begin - rescue can be
2007 Oct 14
5
Ruby/Informix 0.6.1 released
This is a maintenance release to fix a bug triggered while working
with Ruby on Rails and Informix.
Web site: http://ruby-informix.rubyforge.org
Changelog:
0.6.1 13/10/2007
------------------
Bugs fixed:
* Database#columns was returning an empty array from within
the
Informix ActiveRecord adapter
(ActiveRecord::ConnectionAdapters::InformixAdapter#columns)
if
2011 Mar 16
3
only one puppet client fails with yum
hello list..
I am sharing a yum configuration in a class (centos.pp) between two
nodes. But the yum configuration doesn''t apply at all to one node
even tho it does to another identically configured node.
## packages are failing to install via yum on one ec2 aws instance and
another identical ec2 instance works fine
[root@kromep2 ~]# cat /etc/redhat-release
CentOS release 5.5 (Final)
2010 Oct 27
2
Merge disparate lists
My two lists look like below
Need an R code example that
combines the two.
l_one
"key"
2
1
2
l_two
"ndx", "descr"
1, "this"
2, "that"
3, "other"
4, "finis"
My goal is a new list that looks
like below.
ndx descr
2 that
1 this
2 that
Thanks,
Jim
2007 Jul 17
1
Yumrepo''s subscribe ran before package require Yumrepo?
I am trying to set a "subscribe" for a Yumrepo object so that an Exec "yum
clean all" is ran immediately after a Yumrepo is changed. With the following
setup, I am not seeing the "subscribe" fire off until after Packages that
have a require pointing to the Yumrepo["custom"] are attempted to be
installed.
Is in right to expect that the subscribe on the
2004 Nov 12
1
Shorewall''s bogon file needs updating
As far as I can tell from <http://shorewall.net/errata.htm> the current
shorewall bogons file is
<http://shorewall.net/pub/shorewall/errata/2.0.8/bogons> which contains
the line:
58.0.0.0/7 logdrop # Reserved
This is incorrect. These two /8s were allocated to APNIC as of April
2004. See also
<http://marc.theaimsgroup.com/?l=nanog&m=108319003517919&w=2> and the
main
2020 Oct 27
0
Re: [libnbd PATCH] info: Add support for new 'qemu-nbd -A' qemu:allocation-depth
On 10/16/20 10:23 AM, Eric Blake wrote:
> A rather trivial decoding; we may enhance it further if qemu extends
> things to give an integer depth alongside its tri-state encoding.
> ---
>
> I'll wait to push this to libnbd until the counterpart qemu patches
> land upstream, although it looks like I've got positive review.
Whoops, I accidentally pushed this before qemu
2005 Mar 06
2
Using url_for in ActionMailer templates
Hi All
I am just adding some basic e-mail notices to my Rails app using
ActionMailer, and have one small issue. I want to provide a
confirmation URL to users who sign up for an account. I can obviously
just hardcode the URL and append the confirmation code to it, but I''d
much rather be able to use something like:
url_for(:controller => ''authentication'', :action