search for: validates_multiparameter_assign

Displaying 2 results from an estimated 2 matches for "validates_multiparameter_assign".

2007 Mar 13
1
Using ActiveRecord outside of Rails error
Hi, I have a script which is using ActiveRecord for database queries outside of a rails app. It seems to work fine for doing finds on models, but everytime I try to create a new model object and then save it, I always get the error: MyModel.new({:name=>''foo''}).save gives NoMethodError: undefined method `read_inheritable_attribute'' for #<MyModel:0x251f7d8>
2007 Nov 03
3
Birthdate validation
...in only numbers." validates_presence_of :email validates_format_of :email, :with => /^([^@\s]+)@((?:[-a-z0-9]+\.)+[a- z]{2,})$/i validates_acceptance_of :policy_agreement, :message => "must be accepted. You have to read and agree with the Aykall Policies before signing in." validates_multiparameter_assignments :message => " is not a valid date." age_limit = Date.new(Date.today.year, Date.today.month, Date.today.day).change(:year => Date.today.year - 18) validates_numericality_of :birth_date, :less_than => age_limit, :message => "is invalid. You have to be at least 18 yea...