search for: perform_validation

Displaying 4 results from an estimated 4 matches for "perform_validation".

2007 Mar 13
13
validates_inclusion_of disabling
Hello all. I have a problem using validates_inclusion_of. I need to switch off some validations during a migration period, is there a way? I tried to use if, with a static method of one of my models, but the behaviour is something strange It seems that the static method should be in a string to be evaluated. And the order of the elements in the if is counting... :if => (:some_field
2009 Sep 09
0
Rails 2.3.4 ActiveRecord association problem
...rce = false, validate = true) set_belongs_to_association_for(record) force ? record.save! : record.save(validate) end The ActiveRecord save method: def save create_or_update end The comments for the save method indicate that it can take an optional perform_validations method, and the Validations module defines (with alias_method_chain :save, :validation). So, finally my question: what is going on here? ActiveRecord is calling a save method passing an arg, but the save method in ActiveRecord isn''t defined to take a boolean. I''m guessing that...
2007 Jan 10
3
ActiveRecord Error?
We spent a big chunk of yesterday hunting down a strange bug in one of our rails apps and created a test project to try out different theories on what was going on. The result so far is a very small test case app that perfectly reproduces the problem. The question is, is there anything *wrong* with what we''re doing here, or is it a problem with ActiveRecord? We''re on rails
2012 Sep 18
2
undefined method `to_sym' for nil:NilClass
...(3.2.2) lib/active_model/validations/callbacks.rb:53:in `run_validations!'' activemodel (3.2.2) lib/active_model/validations.rb:179:in `valid?'' activerecord (3.2.2) lib/active_record/validations.rb:69:in `valid?'' activerecord (3.2.2) lib/active_record/validations.rb:77:in `perform_validations'' activerecord (3.2.2) lib/active_record/validations.rb:50:in `save'' activerecord (3.2.2) lib/active_record/attribute_methods/dirty.rb:22:in `save'' activerecord (3.2.2) lib/active_record/transactions.rb:241:in `save'' activerecord (3.2.2) lib/active_record/transac...