タグ

RubyとForgeryに関するtoshi3221のブックマーク (2)

  • 223Soft -

    Document Data Structure in MongoDB Express MongoDB lets you easily store structured and unstructured data in a flexible and dynamic database schema. It supports CRUD operations on complex data objects using JSON as the main data type. Its an open source solution so it may not be as robust or well supported as commercial management tools. However it is easy to deploy and works well for most use cas

  • Forgeryの独自辞書でFabricateする

    それぞれの言葉の意味を知らないとさっぱり想像もつかないタイトルになってしまった。 えーと Ruby でダミーデータを生成するためのツールを自分で拡張する話です。 Forgeryは独自辞書を持てるどうもそうっぽいなぁというのはドキュメントを見てると想像がつくんだけど、具体的にどうしたらいいかはちょっとすぐには分からなかった。でもこれ見てだいたい分かった。 Forgery Gem, How to create Dictonaries and Forgeries « Ruby NYC まとめると Ruby のコード的には Forgery を継承したクラスを作るそのクラスの中で dictionaries[:dictionary] と書くと symbol で書いた名前の、独自に定義した辞書ファイルの内容を読み込むことができるということらしい。 Rails 環境下のパスが載っているが、これはちょっと違

  • 1