Displaying 1 result from an estimated 1 matches for "ended_on".
Did you mean:
end_on
2006 Feb 02
1
tricky form validation
Hi list,
I want to create a form validation in my Marketing Model.
I want to raise an error only if a previous marketing campaign for a
property has not been completed (ie. ended_on IS NULL)
I managed to get this working in the Controller using something this:
...
if Marketing.count("property_id = #{@marketing.property_id} AND ended_on
IS NULL") > 0
...
However I assume validation should be in the Model so this is where I am
stuck.. I am guessing ill have to u...