search for: validates_as_uk_postcode

Displaying 1 result from an estimated 1 matches for "validates_as_uk_postcode".

2007 Jul 26
3
Spec for validation plugin
Hi, I''m writing a specification for a model called Location which has a post_code attribute which should be a valid UK postcode. I''m using the http://svn.designbyfront.com/rails/plugins/validates_as_uk_postcode/ validates_as_uk_postcode plugin to handle the validation but I''m not sure how I should properly specify my model. Heres the model code: class Location < ActiveRecord::Base validates_as_uk_postcode :post_code end In my model spec I want something like this (assume @location has...