Hello World

Be Happy!

rails model belongs_to null able


class Article
  include Mongoid::Document
  include Mongoid::Timestamps
  field :title, type: String
  belongs_to :category, optional: true
  has_many :tags, dependent: :destroy
  validates :title, uniqueness: true
  validates :title, presence: true
end
#rails (32)
List