What you have setup there is a Many to Many association. Is that really what you want? Can one profile belong to multiple users?
If you give us a better understanding of your end goal we may be able to help more. On Jan 12, 9:32 am, LeonS <[email protected]> wrote: > Hi, > > i try to implement a Profile System for the users into my Rails App. > i want to implement it with these models: > > class Profile < ActiveRecord::Base > has_many :Profileships > has_many :users, :through => :Profileships > # Gehört zu einer Profil Gruppe > belongs_to :profile_group > end > > class Profileship < ActiveRecord::Base > belongs_to :user > belongs_to :Profile > end > > class ProfileGroup < ActiveRecord::Base > # Eine Profil Gruppe hat mehrere Profile > has_many :profiles > end > > So a user can edit his Profile informations of a Profile group, stored > in the Profileship Database(there is a value fieldin the Profileship > table). > Do you think this is a good solution, or should i manage the Profile > informations in one model and avoid the :has_many_through thing? > How should i handle the views, because i think i have to setup a view > for every Profilegroup, because i cant build them dynamical, because i > can't figure out if a information needs a input or a textare or .... .
-- 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 [email protected]. 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.

