class Post < ActiveRecord::Base

  belongs_to :user

  delegate :username, to: :user
end

class Post < ActiveRecord::Base

  validates :title, :body, :user_id, presence: true

  belongs_to :user

  delegate :username, to: :user
end

Add validations to Post model
Add validations to Post model
