similar to: Using a records "id" in validation

Displaying 20 results from an estimated 2000 matches similar to: "Using a records "id" in validation"

2006 Jan 04
0
OT: Displaying errors on credit-card processing
Hi, This question isn''t Rails-specific, but since Basecamp (& the family of premium 37signals apps) have the best implementation of credit-card processing I''ve seen, I''m hoping maybe DHH could lend an answer. Of course, anyone is welcome to chime in! # Some background Our nonprofit is building a Rails-driven store and donation center and our developer is
2004 Apr 27
1
parsing to compare
Admittedly this is probably pretty stupid of me, but there are just some things I can't understand by reading documentation. Any suggestions or recommendations about how to handle my problem are greatly appreciated. I'm trying to achieve the same functionality as my Nortel PBX, without rewriting much 'C' code. In my dialplan I'd like to compare two variables as a means of
2004 Jan 30
0
Re: DISA and authcodes (was: t410p)
[moved from -dev, as the thread is better suited for -users] At 5:10 PM -0600 1/30/04, James Sharp wrote: > > I've pretty much got the routing covered at this point, I'm just not sure >> how to get the Asterisk system to answer and give me dialtone immediately. >> Any ideas or recommendations would be greatly appreciated. > >app_disa will give answer and give
2006 Jun 30
4
ActiveRecord Migrations, without autonumbered PK''s
I love using ActiveRecord Migrations to build tables. Sometimes, I don''t want to use autogenerated PK''s - I want to set them automatically (why? I''m importing read only data from a large list of medications, and want to use the PK''s assigned by the medication research company...). Is there anyway to do this using Migrations? I know that I don''t
2006 Jun 29
7
sql question for rails
Hi, i was hoping someone could help me out with a small yet quite time-boggling task...i have a two tables users, groups joined in as a habtam relashinship (has and belongs to many) and i need to select from the mydb (mysql if it matters) users out of the User model, in accordance with TWO groups in one rails opperation to improve performance...basicly, say i have ten groups and ten users,
2010 Aug 13
2
Rails 3 / ActiveModel for Credit Card information?
When submitting billing information in the past I''ve always used attr_accessor for credit card details as they should not be saved in the database. In addition I always end up storing the card expiration date so that the date form helper works correctly. With Active Model it seems logical to create a CreditCard class to hold this data instead. **1st issue.** It seems there still
2010 Dec 17
2
Log Filtering Sensitive Data
Hi, I know how to filter passwords, etc etc by using the below filter_parameter_logging :password But if i have params like the below so how do i filter them out. "order"=>{"card_number"=>"4111111111111160"} ive tried the following below but it doesnt seem to work filter_parameter_logging :card_number, :order_card_number, :order How do people do this
2009 Sep 10
2
Problem Deleting IMAP Folders
Hello, In my configuration I have mail_location = maildir:/Mail/frank.gr/%n:INDEX=/Mail/frank.gr/ __Indexes/%u I can create new folders in an IMAP session, but when I try to delete I get permission denied. From the LOG Sep 10 13:20:06 IMAP(stuart): Error: unlink_directory(/Mail/frank.gr/ __Indexes/stuart/.TEST) failed: Permission denied ls -ald /Mail/frank.gr/__Indexes/stuart/.TEST
2007 Oct 13
4
Chapter 9
Hello, I''m currently stunk on this issue for few days and I do not know how to get it fixed. The system always raises this error message : order is closed and here is my order.rb: class Order < ActiveRecord::Base include ActiveMerchant::Billing before_validation :set_status attr_protected :id, :customer_ip, :status, :error_message, :updated_at, :created_at attr_accessor
2006 Mar 14
7
Overriding new or create for a model
I have a model where I need to calculate one of the fields when I create a new instance. It seems to me that I should do this in the model code and that I should override the new and/or create methods. Is this the right approach and, if so, how can I execute the existing method but add on my calculation? I want something like: def create -Do the original create first- field =
2006 Jun 16
4
problem with join
Hi all, I''m having a problem with a join inside a paginate, the code is like this: @ruta_pages, @rutas = paginate :rutas, :conditions => conds_arr, :joins => "AS ru LEFT JOIN vehiculos AS ve ON ru.vehiculo_id = ve.id", :per_page => 10, :order => "fecha DESC" The problem with this, is that the query returns the
2006 Mar 22
10
Need for multiple acts_as_list
I have a model "Childmodel" that belongs_to two other models "Parent1" and "Parent2". "Parent1" "has_many :childmodels, :order => :positionp1" and "Parent2" "has_many :childmodels, :order => :positionp2". i.e. The child is independently positioned within each of its parents. This works fine and gets me the useful
2008 Jul 16
2
belongs_to causing endless loop on first call to save!
Hi, I have a situation I''m hoping someone out there may be able to shed some light on. I have a Rails app (2.1.0 on Ruby 1.8.7) with a wizard-based sign up process, that has recently been changed from storing incremental data in the database to having a medium sized object graph living in the user session until the user completes the entire sign up process (this is a business
2006 Jun 26
4
has_many :through
first, the models: class Listing < ActiveRecord::Base has_many :keyword_links has_many :keywords, :through => :keyword_links, :conditions => "active = 1" end class Keyword < ActiveRecord::Base has_many :keyword_links has_many :listings, :through => :keyword_links, :conditions => "active = 1" end class KeywordLink < ActiveRecord::Base belongs_to
2008 Jan 18
6
Odd transfer speed issue
Hi all, I'm seeing slow transfers to/from my samba server. I just tried to copy a 270MB file from a samba share to an XP machine. At first, the estimated time displayed as 141 minutes :( The odd thing is that if I then flood-ping from the server (in this case, I pinged my dsl router), the transfer completes in about 10 seconds. Hitting F5 repeatedly when browsing a share on the server
2004 May 11
3
rsync output -vv differs with dry-run option
I'm trying to figure out if a file has changed since the last rsync call. I use the following command line: rsync -cvv /mnt/xxx/vol1/dbase/100/kunden.dbf /mnt/label | grep "^total: " | sed -e 's/.* data=//' This gives a 0 if the file is unchanged and the file size if the file has changed. Adding the "dry-run" option "n" to the command line always
2006 Mar 01
6
How to retrieve attributes from HABTM?
We have tables Users and Communities linked by has_an_belongs_to_many. The join table Communities_Users has additional fields [ is_active, is_blocked, join_date] etc. These are populated using @user.push_with_attributes(:is_active => true,...). Later on how do we update or retrieve the attributes in the link table for a given user or a community with doing it explicitly using SQL? Thanks,
2006 Nov 06
8
Bizarre mysql issue
I am making an account confirmation system. Unfortunately, for some odd reason, the email''s authcode differs from mysql''s auth code. The email''s auth code is 84560046651013854756231785743141, yet mysql''s auth code is always 2147483647 for every account I create.... i don''t get it! The email''s auth code is taken from the same variable, and
2007 Dec 20
1
ifelse problem
Could someone help me with the following code snippet. The results are not what I expect: > Sheet1$Claims[1:10] [1] NA 1 2 NA NA NA NA NA NA NA > Sheet1[1:10,"SubmissionStatus"] [1] Declined Bound Bound Bound Bound Bound Declined Dead Declined [10] Not Taken Levels: Bound Dead Declined Not Taken > Sheet1$Claimsnum <- NA >
2011 May 19
1
SIP 603 Declined after AGI execution
Hello everyone. I'm using Asterisk 1.4.31 and A2Billing 1.7.0 to manage a small wholesale operation, so I configured A2Billing for not to answer the call nor play any greetings or balance notifications to the caller. I'm authenticating each customer by it's IP address, and each customer has it's own context, in which I set the following: ;=====in extensions.conf======