Bumble はGoogle App Engine for JavaのDateSoreを利用するためのライブラリですが、Railsで利用する前提で作られているので、 Merbで利用する場合には、以下のような修正を加えると良いようです。
bumble.rb
1 module Bumble 2 (..snip..) 3 def self.included(base) 4 base.send :include, InstanceMe thods 5 base.send :extend, ClassMetho ds 6 Merb::Router.root_behav ior = 7 Merb::Router.root_behav ior.identify(Bumble => :key) 8 end
これによって、resource(@person) #=> /people/5 のようにidentifyしてくれるようになります。
posted by
genki
on Sun 12 Apr 2009
at 02:23