Elance Exams Answers PDF file

-- PDF FILE --
Download PDF file of elance Zoho Creator Exam Answers

To establish an association from a Post model to another Post model (say if one post is in response to another and there is a parent_post_id column on the posts table), you would add the following to the Post model:

belongs_to :post, :foreign_key => 'parent_post_id'
has_one :parent_post_id, :class_name => 'Post'
has_many :parent_posts, :foreign_key => 'parent_post_id'
has_one :parent_post, :class_name => 'Post'
belongs_to :parent_post, :class_name => 'Post'
  • Follows us our servcies
  • Facebook icon
  • Linkedin icon
  • twitter icon
  • rss icon
  • social icon