Sha256: a63f8bc0a1520f4b5e64c1d4caa460f84169a3414736d90337500e48a5081c09

Contents?: true

Size: 410 Bytes

Versions: 18

Compression:

Stored size: 410 Bytes

Contents

# encoding: utf-8
class Comment
  include Mongoid::Document
  # jinda begin
  include Mongoid::Timestamps
  field :body, :type => String
  field :name, :type => String
  field :image, :type => String
  belongs_to :article, :class_name => "Article"  
  belongs_to :user, :class_name => "User"  
  belongs_to :commentable, polymorphic: true 
  index({ commentable_id: 1, commentable_type: 1}) 
  # jinda end
end

Version data entries

18 entries across 15 versions & 2 rubygems

Version Path
jinda-0.8.0 test/dummy/app/models/comment.rb
jinda-0.8.0 lib/generators/jinda/templates/app/models/comment.rb
jinda-0.7.7.4 test/dummy/app/models/comment.rb
jinda-0.7.7.4 lib/generators/jinda/templates/app/models/comment.rb
jinda-0.7.7.3 lib/generators/jinda/templates/app/models/comment.rb
jinda-0.7.7.3 test/dummy/app/models/comment.rb
jinda-0.7.7.2 lib/generators/jinda/templates/app/models/comment.rb
jinda-0.7.7.1 lib/generators/jinda/templates/app/models/comment.rb
jinda_mind-1.0.0 lib/generators/jinda/templates/app/models/comment.rb
jinda-0.7.7 lib/generators/jinda/templates/app/models/comment.rb
jinda-0.7.6 lib/generators/jinda/templates/app/models/comment.rb
jinda-0.7.5.5 lib/generators/jinda/templates/app/models/comment.rb
jinda-0.7.5.4 lib/generators/jinda/templates/app/models/comment.rb
jinda-0.7.5.3 lib/generators/jinda/templates/app/models/comment.rb
jinda-0.7.5.2 lib/generators/jinda/templates/app/models/comment.rb
jinda-0.7.5.0 lib/generators/jinda/templates/app/models/comment.rb
jinda-0.7.3 lib/generators/jinda/templates/app/models/comment.rb
jinda-0.7.2 lib/generators/jinda/templates/app/models/comment.rb