Displaying 2 results from an estimated 2 matches for "softwareci".
Did you mean:
software_ci
2008 Jan 08
0
Error in validation
I have the following model
===========================
class SoftwareCi < ActiveRecord::Base
has_one :ci, :as => :content
has_one :primary_group
validates_presence_of :name, :message => "can''t be empty"
end
The controller
================
def create
@software_ci= SoftwareCi.new(params[:ci])
redirect_to :action => ''cre...
2008 Jan 02
6
problem when editing record in polymorphic relation
I have the following three models created applying the polymorphic
concept
==========================================================================
class SoftwareCi < ActiveRecord::Base
has_one :ci, :as => :content
end
class HardwareCi < ActiveRecord::Base
has_one :ci, :as => :content
end
class Ci < ActiveRecord::Base
belongs_to :content, :polymorphic => true
end
The table, cis ,contains the following records
=========================...