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 … .
Thats right, because every User has the same profile fields , the
possible Profile fields are saved in the Profile model.
The value of a profile field of one user is saved in the Profileship
model in the field “value”.
So how can i put that in a view based on the Profilegroup?
So, for example there are profile field for work, main profile fields,
contact field (msn, email, adress…) and so.
So i think there is usage for the user.
Thats right, because every User has the same profile fields , the
possible Profile fields are saved in the Profile model.
The value of a profile field of one user is saved in the Profileship
model in the field “value”.
So how can i put that in a view based on the Profilegroup?
What on earth are you trying to achieve? What is a profile group for?
How do you want this to work from the user’s perspective?
Let me explain Why i Write the Models:
i’m Coming from Database Development, so normalization is very
Important for me.
If i create just a Profile Model and put all possible profile Fields
into that, than there is no normalization
Should i avoid the normalization in Case of RoR and keep the Models
assimple As possible?
So, for example there are profile field for work, main profile fields,
contact field (msn, email, adress…) and so
These could all be in the User model or, failing that, in a separate
Profile model where User has_one :profile. Why do you need Profileship
and ProfileGroup?
So i think there is usage for the user.
Not as far as you’ve explained. Please explain more clearly if I’ve
missed something.