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 rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.


Reply via email to