Displaying 1 result from an estimated 1 matches for "loaddist".
Did you mean:
loaddat
2008 Jul 17
2
problems with validation on STI
....string :type
t.integer :simulation_id
t.string :dist_name
t.string :desc, :default=> ''fixed''
t.float :param1, :default => 5.0
t.float :param2, :param3
t.timestamps
#fields for RscDist
t.integer :resource_id
#fields for LoadDist
t.integer :load_id
end
end
My model file looks like this:
class Distribution < ActiveRecord::Base
validates_presence_of :desc, :param1
validates_uniqueness_of :dist_name, :scope => "simulation_id"
validates_inclusion_of :desc,
:in...