This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Baz | |
def hello | |
"baz " + super | |
end | |
end | |
module Bar | |
def hello | |
"bar " | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Foo | |
include Mongoid::Document | |
field :bar, :type => Array | |
end | |
# ruby-1.9.2-p0 > Foo.create(:bars => [1,2,3]) | |
# => #<Foo _id: 4d1128c4fddc0d2146000001, bars: [1, 2, 3]> | |
# ruby-1.9.2-p0 > Foo.first.bars | |
# => [1, 2, 3] |