When I have the subclasses in the parent class file itself I am able to get the names of the subclasses using <Class_name>.type_options using acts_as_sti_factory plugin. But if each of the subclass is a separate rb file then type_options is not getting the sub class name. Example: In my sort_field.rb, I have class SortField < ActiveRecord::Base def self.inheritance_column ''sort_type'' end end class AscendingSortField < SortField end class DescendingSortField < SortField end Now SortField.type_options would fetch me the names of the subclasses. But if I have the subclasses in a separate file such as ascending_sort_field.rb and descending_sort_field.rb the same does not help. Please help me.. -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---