I have created a rails application which works, I now want to write a
little batch program which uses the different "models" to perform some
tasks. This is what I do:
require File.dirname(__FILE__) + '/../config/environment'
s = System.new( :name => 'a')
if s.save == false
print "Error saving\n"
System is a model, has a field "name" which is unique.
class System < ActiveRecord::Base
When I run the program the second time, I get the "Error saving"
message and the program exits (as expected).
There is no error raised by the save function. If I do no explicit
test, the program just runs on. Is there a way to get better error