Sha256: ee021d9d38fa5e98a5559a6d0e219354db0af8b2348f8f6ac56b0b4d6316a270

Contents?: true

Size: 349 Bytes

Versions: 6

Compression:

Stored size: 349 Bytes

Contents

# encoding: utf-8
class Article
  include Mongoid::Document
  # mindapp begin
  include Mongoid::Timestamps
  field :title, :type => String
  field :text, :type => String
  belongs_to :user
  has_many :comments
  validates :title, :text, :user_id, presence: true
  field :body, :type => String
  field :keywords, :type => String
  # mindapp end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
mindapp2-0.1.1.5 lib/generators/mindapp/templates/app/models/article.rb
mindapp2-0.1.1.4 lib/generators/mindapp/templates/app/models/article.rb
mindapp2-0.1.1.3 lib/generators/mindapp/templates/app/models/article.rb
mindapp2-0.1.1.2 lib/generators/mindapp/templates/app/models/article.rb
mindapp2-0.1.1.1 lib/generators/mindapp/templates/app/models/article.rb
mindapp2-0.1.0 lib/generators/mindapp/templates/app/models/article.rb