class Snippet
  include Mongoid::Document
end

class Snippet
  include Mongoid::Document
  field :name, :type => String
  field :type, :type => String
  field :description, :type => String
  field :tags, :type => String
  field :text, :type => String
end

Add attributes to Snippet model; used rails generate model cmd
[002] Add attributes to Snippet model; used rails generate model cmd

$ rails generate model snippet name:string type:string
description:string tags:string text:text      invoke  mongoid
      create    app/models/snippet.rb
      invoke    rspec
   identical      spec/models/snippet_spec.rb
