That's no polymorphic relation at all. In a polymorphic relation would mean, that the table contains one and the same kind of data for a set of other tables. Say you have client and admin tables and want all of them to have an address, then address would be polymorphic, assigned either to a client or address.
In your case the user is the central table and the other three relate to it by simply having an user_id field. user has_many monthly_photos user has_many daily_photos user has_many date_photos daily_photos belongs_to :users monthly_photos belongs_to :users date_photos belongs_to :users You could enhance that code by using a single photo table with a kind_of field, that's saying if it's daily, monthly or fixed date and using a use_at date field, interpreting it depending on kind_of. Or use "Single table inheritance" (explained in Rails API docs ActiveRecord::Base) But I wouldn't do that for such a small piece of functionality. --~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---