search for: write_inheritable_set

Displaying 3 results from an estimated 3 matches for "write_inheritable_set".

2005 Dec 02
8
UserEngine: stack level too deep
...ot; stack level too deep I''m using EdgeRails on WinXP SP2 PgSQL 8.1 Cheers, Ean PS: Here''s the trace: #{RAILS_ROOT}/vendor/rails/activerecord/lib/active_record/validations.rb:682:in `|'' #{RAILS_ROOT}/vendor/rails/activerecord/lib/active_record/validations.rb:682:in `write_inheritable_set'' #{RAILS_ROOT}/vendor/rails/activerecord/lib/active_record/validations.rb:240:in `validate_on_create'' #{RAILS_ROOT}/vendor/rails/activerecord/lib/active_record/validations.rb:379:in `send'' #{RAILS_ROOT}/vendor/rails/activerecord/lib/active_record/validations.rb:379:in...
2006 Jun 25
0
Using the database schema to help validate data
...Topic.validates_length_of :title, :maximum => 5 Index: lib/active_record/validations.rb =================================================================== --- lib/active_record/validations.rb (revision 4491) +++ lib/active_record/validations.rb (working copy) @@ -250,6 +250,21 @@ write_inheritable_set(:validate_on_update, methods) end + def validates_database_schema() + columns.each {|column| + column.primary = column.name == primary_key + # Setup default validation for text columns + if column.text? then + # varchars have a limit, while...
2005 Apr 23
7
Validation question
Hi all, Is there a way to invoke validations at times other than save, create and update? I know that I can do this by writing my own validation checks using errors.add_[blah], but I''d like to leverage the existing validation code. What I have is two sets of fields in a record, set A and set B. Both sets must be validated on record create. However, the trouble is that after