similar to: Multi Row validation... or running queries within Validate function?

Displaying 20 results from an estimated 1400 matches similar to: "Multi Row validation... or running queries within Validate function?"

2007 Jan 12
3
5v capable motherboards
Anyone have a suggestion on where I can get a decent new MB with 5v capable PCI slots. It seems like every decent server MB on the market has 3.3V slots only. Is diving into the junkbin my only choice if I can't afford to replace the 5v quad-T1 wildcard? Thanks Mark Farver
2004 Dec 21
1
zaptel ppp HDLC Receiver Overrun messages
I have a pair of sites tied together with a T1 line running zaptel PPP on either end. The system works, but I keep getting these messages in the kernel logs, and users are reporting connection problems (TCP timeouts, and hangs) especially under high usage. --snip-- HDLC Receiver overrun on channel WCT1/0/1 (master=WCT1/0/1) HDLC Receiver overrun on channel WCT1/0/1 (master=WCT1/0/1) HDLC
2004 Nov 29
1
Outbound E&M?
I've got a new setup (different building) where Asterisk is sitting between the PBX and phone company on a E&M T1 line. Mitel PBX <-> Asterisk <-> Phone company Inbound works. Asterisk gets the in-band digits from the phone company and hands the call off to the Mitel just fine. Outbound is weird. Asterisk seems to expect that the mitel will send routing information
2004 Nov 28
4
PRI Dialing failure?
So I reached the point where my PRI is accepting incoming calls, but I cannot dialout. I must be doing something stupid, but I can't figure it out. The Asterisk box is sitting between the Mitel and the phone company, and has PRI lines to each. Asterisk was built from CVS r1-0 Log for a call from mitel heading outbound: ------------------------- -- Accepting call from '' to
2006 Jul 18
2
validate method doesn''t recognize another instance method
All, I am attempting to do some custom validation on my object. Here is my validate method: protected def validate puts "Do I have the target_list_ids method? " + self.methods.include?(''target_list_ids'').to_s if target_list_ids.nil? || target_list_ids.length == 0 errors.add_to_base("You must choose at least one target list for this job")
2007 Sep 02
0
using database for validation
I''ve been playing around with the idea of using the database for model validation where possible (instead of duplicating that validation in rails). My first approach to this was to catch exceptions from save/ create and parse the errors, in my case from postgres, to turn them into something friendlier. Something like: def update create end def create begin super
2007 Mar 20
1
modem passthru
Our setup is: 9.6k Modem <-analog-> Mitel SX-200 <-(pri)-> Asterisk <-(pri) -> Telco The modem works fine with the Mitel directly connected to the Telco, but once we add Asterisk in between connections start failing. I suspect the issue is caused by the echo canceller, since I believe the issue appear about the time we turned echo cancellation on (for the IAX users). We
2009 Dec 21
0
errors.add_to_base translation missing: en, activerecord
In my model I am using errors.add_to_base: errors.add_to_base "Error 1" This works fine. If I do this twice: errors.add_to_base "Error 1" errors.add_to_base "Error 2" I receive the message: translation missing: en, activerecord, errors, models, modelname, attributes, base, as part of my error messages. Anyone know how to get rid of this? Many thanks, Mike
2006 Apr 07
2
errors.add_to_base
What are the limitations on using: errors.add_to_base to display errors in views? I have tried for days to add errors from my object.rb and they never get displayed. class Keyword < ActiveRecord::Base validates_presence_of(:name, :message => "Name is required.") validates_uniqueness_of(:name, :message => "This name is already in use. Please try
2006 Aug 14
2
after_create is not being called
Hi all I have the following model: class PhotoGallery < ActiveRecord::Base attr_accessible :title, :description, :file_path, :title_photo_id has_many :photos, :dependent => :destroy belongs_to :title_photo, :class_name => ''Photo'', :foreign_key => ''title_photo_id'' validates_presence_of :title, :description, :file_path
2006 Jul 12
1
validate method not getting called?
Here''s a snippet of my model: validates_presence_of :from_name, :from_email, :reply_name, :reply_email, :eSubject protected def validate puts "Calling: #{target_list_ids}" errors.add_to_base("You must choose at least one target list for this job") if self.target_list_ids.nil? end It appears that the validates_presence_of are being called just fine,
2010 Apr 29
1
Setting a message on a model -without- errors.add_to_base
I''m trying my best to follow the skinny controller/fat model concept, and I''ve got a series of callbacks (that I''m about to move into observers) running on a few models. Based on what these callbacks do to the data (it''s implementing business rules), I''d like to add some type of message on the state of the model *without* invalidating it. For example:
2006 Jan 19
1
Model Validation & Floating Attributes
Hello all ! I have a model being validated that spits it''s error messages on the resulting page using: error_messages_for(:mymodel) .... Basic stuff. It''s working perfectly. Now, I have something else I want to check on the same page (that isn''t an attribute to the Model)... and am trying to add it using: @mymodel.errors.add_to_base("another error here")
2006 May 02
1
Custom error messages
On a model I have the following simple validator: def validate unless name && name =~ /^\w+$/ errors.add_to_base("Name is missing") end end I would like to display a custom message on my views, without using the helper <%= error_messages_for "table" %> Where the messages from errors.add_to_base are stored and how to access them in the views? --
2003 Nov 10
3
Inter-digit minimum
I see there is the DigitTimeout application that sets the maximum time between digits before asterisk will interpet. Is there any way to control the minimum? We are having problems with incoming calls on our X100P where callers try to dial 10, but the 1 gets detected twice and they end up on extension 11. Thanks Mark Farver
2006 Jan 12
17
Application.rb params
I need to check if a parameter is set so that I can build some information for my application, but No matter how I format my if statement in the file " Application.rb" it return the following error. You have a nil object when you didn''t expect it! You might have expected an instance of Array. The error occurred while evaluating nil.[] Here is the line if params[:day] So we
2006 Feb 16
1
Help with validation
I am trying to write some simple code post a form, update the database and do some validation. I have 2 problems: 1) The validation fails but I can''t get hold of the error message 2) I can''t get the form to redisplay the previously entered data for the user to correct. I have 2 controllers: user and holiday. A user can request a new holiday by filling in a form. I have a
2006 Feb 17
1
validate() with has_many association
I''m creating a simple portfolio site for a painter. I have a painting and an image model with following relationship: Painting has_many :images Image belongs_to :painting On the edit screen the user can edit the Painting data as well as upload pictures for a thumbnails and full size image. The Image model extracts filename, width, and height from the uploaded file, saves those
2006 Jul 25
1
How do I validate using associated objects?
This doesn''t make any sense to me anymore. I have an Upload that belongs_to a Comment. Within my Upload model I expect to be able to access the associated comment with comment.foo. I can only seem to do this AFTER validation. I''m assuming before_create takes place between validation and updating the database, because when I try to access comment.foo within the validate
2006 Mar 12
0
Validate a model with a session parameter
Hi I''ve set a tableless model for a contact form with this instruction: validates_format_of :captcha, :with => ActionController::SessionManagement::session[:captcha], :message => "Security code is wrong. Please enter it again" Unfortunately it raises an undefinied method error; is the session call incorrect or is it just