<repo_name>wutt77/GREibt<file_sep>/app/models/userdetail.rb
class Userdetail < ActiveRecord::Base
	belongs_to :user
  #validates that one user can create just one user details
  validates_uniqueness_of :user_id, :message => "details already exist"

end
<file_sep>/app/models/topic.rb
class Topic < ActiveRecord::Base
  #relation between topics and post
  has_many :posts
  #has_many :users, through: :posts
end
