search for: validates_presense_of

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

Did you mean: validates_presence_of
2006 Jul 11
4
assert fails with <false> is not true
Hi, I have a simple model and written a testcase. class Product < ActiveRecord::Base validates_presense_of :name end ------------- class ProductTest < Test::Unit::TestCase fixtures :products def test_invalid product = Product.new assert !product.valid? end end ------------- The testcase fails with a message, <false> is not true. What is wrong with the testcase? I can see it ruby...
2006 Feb 07
4
Ruby, Rails & Inheritance
Hi! I am looking for a solution for the following problem: Some of my models share some attributes and also was in need for some extra features, so I created a class "RecordWithFeatures": ----------------------------------------------------------------- class RecordWithFeatures < ActiveRecord::Base # @Override def self.descends_from_active_record? superclass ==
2006 Apr 12
11
validate_presence_of not working for me
Hi all, I just begun with RoR and going through the Agile development w Rails depot example ATM. I did everything according to the book (i believe), and after 3 hours of googling, reading docs, making sure i did everything correctly i can not make the validate_presence_of() to work - at least not as it looks in the book. My Product model looks like: class Product < ActiveRecord::Base