search for: vallayil

Displaying 2 results from an estimated 2 matches for "vallayil".

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
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 => ''create_ui'' end The