Hello Rails experts, Need your help in following issue with the <b>acts_as_list and single table inheritence</b> Code details : #model file class <b>RelatedItem</b> < ActiveRecord::Base acts_as_list :scope => :relater belongs_to :relater, :polymorphic=>true end class RelatedLink < <b>RelatedItem</b> end class RelatedFeed < <b>RelatedItem</b> end class Clip < ActiveRecord::Base has_many :<b>related_items</b>, :as => :relater end ## Table Structure of <b>RelatedItem</b> id :integer(11) name :string(255) relater_id :integer(10) relater_type :string(255) type :string(255) position :integer(10) source :string(255) ######### (http://pastie.org/1214846) In the above case while creating new record for RelatedLink or RelatedFeed it generating position number with scope of RelatedLink or RelatedFeed.. like @clip = Clip.find(10) when creating records in RelatedLink (i,e @related_item = RelatedLink.new(:relater_id=>@clip.id, :relater_type=>''#{@clip.class.name}'') } output showing like rec 1 -> position=1 ,relater_id=10, relater_type="Clip", type="RelatedLink" rec 2 -> position=2 ,relater_id=10, relater_type="Clip", type="RelatedLink" rec 3 -> position=3 ,relater_id=10, relater_type="Clip", type="RelatedLink" AND when creating records in RelatedFeed (i,e @related_item = RelatedFeed.new(:relater_id=>@clip.id, :relater_type=>''#{@clip.class.name}'') ) with RelatedFeed output: records 1 -> position=1 ,relater_id=10, relater_type="Clip", type="RelatedFeed" records 2 -> position=2 ,relater_id=10, relater_type="Clip", type="RelatedFeed" records 3 -> position=3 ,relater_id=10, relater_type="Clip", type="RelatedFeed" ## But here I need create those entries with the scope on Relater only and not on RelaterFeed or RelatedLink I mean do not want to repeat these Position number 1,2,3 then 1,2,3 for same clip(i.e Relater). Currently it generating those positioning individually for RelatedFeed and for RelatedLink of same Relater(i.e clip) Here I need something like when I''ll assign Relater to RelatedLink or RelatedFeed it auto create positioning on the basis of Relater only like RelatedLink : rec 1 -> position =1, relater_id=10, relater_type="Clip", type="RelatedFeed" rec 2 -> position =2, relater_id=10, relater_type="Clip", type="RelatedFeed" rec 3 -> position =3, relater_id=10, relater_type="Clip", type="RelatedFeed" Then for RelatedFeed rec 1 -> position =4, relater_id=10, relater_type="Clip", type="RelatedFeed" rec 2 -> position =5, relater_id=10, relater_type="Clip", type="RelatedFeed" rec 3 -> position =6, relater_id=10, relater_type="Clip", type="RelatedFeed" position will be like 1,2,3,5,6.. etc Any Idea..?? How is to be done..? Thank you :) -Ganesh K -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.