I have an after_save callback when I save an Organisation record.
def after_save
#create an admin user for this organisation
if self.users.size.zero?
user=User.new(:organisation_id=self.id,
:first_name = Admin,
:last_name = User,
:logon_name = admin,
Hi guys,
I have given a validation function (validates_uniqueness_of :email) in
my model because i want email to be unique.
So the problem is that whenever i want to update a record then also it
validates. I mean i dont want it to validate while updating the record.
It should happen only when i
On Thu, Feb 11, 2010 at 05:37, Hemant Bhargava li...@ruby-forum.com wrote:
Hi guys,
I have given a validation function (validates_uniqueness_of :email) in
my model because i want email to be unique.
So the problem is that whenever i want to update a record then also it
validates. I mean i
3 matches
Mail list logo