Sha256: e3592cfaea98450bfe197314472f65357bbe75bfbe9dd20f17acdeedac8bd794

Contents?: true

Size: 345 Bytes

Versions: 10

Compression:

Stored size: 345 Bytes

Contents

# encoding: utf-8
class Article
  include Mongoid::Document
  # jinda 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
  # jinda end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
jinda-0.2.0 lib/generators/jinda/templates/app/models/article.rb
jinda-0.1.9 lib/generators/jinda/templates/app/models/article.rb
jinda-0.1.8 lib/generators/jinda/templates/app/models/article.rb
jinda-0.1.7 lib/generators/jinda/templates/app/models/article.rb
jinda-0.1.6.6 lib/generators/jinda/templates/app/models/article.rb
jinda-0.1.0 lib/generators/jinda/templates/app/models/article.rb
jinda-0.0.9 lib/generators/jinda/templates/app/models/article.rb
jinda-0.0.8 lib/generators/jinda/templates/app/models/article.rb
jinda-0.0.7 lib/generators/jinda/templates/app/models/article.rb
jinda-0.0.1 lib/generators/jinda/templates/app/models/article.rb