mongoid / mongoid-grid_fs

A pure Mongoid/Moped implementation of the MongoDB GridFS specification.
Other
83 stars 50 forks source link

Documentation is lacking #49

Closed jonerer closed 10 years ago

jonerer commented 10 years ago

Hey!

Great library, very useful in my application, easy to use etc!

But the documentation is lacking. I would have loved to see an usage example. Either "how to use in rails", like so:

def stream
    # here Item is my domain model
    item = Item.find(params[:id])
    grid_fs = Mongoid::GridFs

    file = grid_fs.find(filename: item.gridname)
    send_data file.data
end

or basically anything that mentions the ".data" method. BR

rmm5t commented 10 years ago

pull-requests that improve the readme or new wiki pages are welcome.

ahoward commented 10 years ago

i've added this particular example.

https://github.com/ahoward/mongoid-grid_fs/commit/9ab0ca49add11a276c87c3e5da15fb0e282fcff7

PRs most appreciated.