Currently i am upgrading the environment from rails 2.3.5 to rails 3.2.21.
I have create the schema and run the command for executing the migration -
bundle exec rake TK_EMAIL=test@example.com TK_USERNAME=admin TK_PASSWORD=test123 db:migrate
one of my migration has following code
negative = Test.new
negative.result = 'negative'
negative.response = 'negatibve'
negative.colour = '#e11d2b'
negative.sequence = 1
negative.is_completion = true
negative.positive_completion = false
negative.save!
And In model i have
before_save :sanitize
def sanitize
# some code
end
when migration is run before_save called in rails 3.2.21 but Not in rails 2.3.5 What is the issue here?
Aucun commentaire:
Enregistrer un commentaire