I put together a sample app to help people learn Merb: http://svn.depixelate.com/applications/invoice_tracker/ I also blogged about it here: http://depixelate.com/2007/5/31/taking-merb-for-a-spin -- Zack Chandler http://depixelate.com
On May 30, 2007, at 10:00 PM, Zack Chandler wrote:> I put together a sample app to help people learn Merb: > http://svn.depixelate.com/applications/invoice_tracker/ > > I also blogged about it here: > http://depixelate.com/2007/5/31/taking-merb-for-a-spin > > -- > Zack Chandler > http://depixelate.comZack- That''s kick ass, thanks for doing that! Dave Goodlad did some really nice work on adding a route generator to merb. I spent some time and integrated it into merb trunk. So if you drop into merb -i console you have a show_routes method available and also a url method. The url method is also available in your controllers and views. Note that there is a slight change to the router definition in router.rb due to the routing refactor. # router.rb # note you need top use Merb::Router instead of Merb::RouteMatcher now: Merb::Router.prepare do |r| r.resources :posts do |post| post.resources :comments end r.default_routes end $ merb -i merb init called irb(main):001:0> show_routes [:edit_comment, "/posts/:post_id/comments/:id/edit"] [:new_post, "/posts/new"] [:posts, "/posts"] [:custom_new_post, "/posts/new/:action"] [:edit_post, "/posts/:id/edit"] [:comment, "/posts/:post_id/comments/:id"] [:post, "/posts/:id"] [:new_comment, "/posts/:post_id/comments/new"] [:custom_new_comment, "/posts/:post_id/comments/new/:action"] [:comments, "/posts/:post_id/comments"] => nil irb(main):002:0> url :edit_comment, :post_id => 42, :id => 24 => "/posts/42/comments/24/edit" irb(main):003:0> url :posts => "/posts" Thanks for making your sample app available, I''m sure it will help people get up to speed in merbland. Cheers- -- Ezra Zygmuntowicz -- Lead Rails Evangelist -- ez at engineyard.com -- Engine Yard, Serious Rails Hosting -- (866) 518-YARD (9273)
Hi Ezra, How do I keep track of the work you are doing? I''m more than a little interested. I see we are up to 0.3.4 (the last I heard of was 0.3.1). I don''t see a changelog. One thing, somewhere in there the class RouteMatcher got replaced by Router. Simple enough, and it definitely fails early... BTW, xml-simple is a dependency now, so likely should be mentioned in the README. Cheers, Bob On 31-May-07, at 3:34 AM, Ezra Zygmuntowicz wrote:> > On May 30, 2007, at 10:00 PM, Zack Chandler wrote: > >> I put together a sample app to help people learn Merb: >> http://svn.depixelate.com/applications/invoice_tracker/ >> >> I also blogged about it here: >> http://depixelate.com/2007/5/31/taking-merb-for-a-spin >> >> -- >> Zack Chandler >> http://depixelate.com > > Zack- > > That''s kick ass, thanks for doing that! Dave Goodlad did some really > nice work on adding a route generator to merb. I spent some time and > integrated it into merb trunk. > > So if you drop into merb -i console you have a show_routes method > available and also a url method. The url method is also available in > your controllers and views. Note that there is a slight change to the > router definition in router.rb due to the routing refactor. > > # router.rb > # note you need top use Merb::Router instead of Merb::RouteMatcher > now: > Merb::Router.prepare do |r| > r.resources :posts do |post| > post.resources :comments > end > r.default_routes > end > > > $ merb -i > merb init called > irb(main):001:0> show_routes > [:edit_comment, "/posts/:post_id/comments/:id/edit"] > [:new_post, "/posts/new"] > [:posts, "/posts"] > [:custom_new_post, "/posts/new/:action"] > [:edit_post, "/posts/:id/edit"] > [:comment, "/posts/:post_id/comments/:id"] > [:post, "/posts/:id"] > [:new_comment, "/posts/:post_id/comments/new"] > [:custom_new_comment, "/posts/:post_id/comments/new/:action"] > [:comments, "/posts/:post_id/comments"] > => nil > irb(main):002:0> url :edit_comment, :post_id => 42, :id => 24 > => "/posts/42/comments/24/edit" > irb(main):003:0> url :posts > => "/posts" > > > Thanks for making your sample app available, I''m sure it will help > people get up to speed in merbland. > > Cheers- > -- Ezra Zygmuntowicz > -- Lead Rails Evangelist > -- ez at engineyard.com > -- Engine Yard, Serious Rails Hosting > -- (866) 518-YARD (9273) > > > _______________________________________________ > Merb-devel mailing list > Merb-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/merb-devel---- Bob Hutchison -- tumblelog at <http:// www.recursive.ca/so/> Recursive Design Inc. -- weblog at <http://www.recursive.ca/ hutch> -- works at <http://www.recursive.ca/>
On 2-Jun-07, at 10:35 AM, Bob Hutchison wrote:> BTW, xml-simple is a dependency now, so likely should be mentioned > in the README.Come to think of it... what are you using that for? Cheers, Bob ---- Bob Hutchison -- tumblelog at <http:// www.recursive.ca/so/> Recursive Design Inc. -- weblog at <http://www.recursive.ca/ hutch> -- works at <http://www.recursive.ca/>
Hey Bob- The best way to keep up is to subscribe to the RSS feed of commits and timeline stuff. http://merb.devjavu.com/projects/merb/timeline? milestone=on&ticket=on&changeset=on&wiki=on&max=50&daysback=90&format=rs s Xml-simple is a dep now so we can POST xml to an action and have the xml parsed into params. Cheers- -Ezra On Jun 2, 2007, at 7:35 AM, Bob Hutchison wrote:> Hi Ezra, > > How do I keep track of the work you are doing? I''m more than a > little interested. I see we are up to 0.3.4 (the last I heard of > was 0.3.1). I don''t see a changelog. > > One thing, somewhere in there the class RouteMatcher got replaced > by Router. Simple enough, and it definitely fails early... > > BTW, xml-simple is a dependency now, so likely should be mentioned > in the README. > > Cheers, > Bob > > > On 31-May-07, at 3:34 AM, Ezra Zygmuntowicz wrote: > >> >> On May 30, 2007, at 10:00 PM, Zack Chandler wrote: >> >>> I put together a sample app to help people learn Merb: >>> http://svn.depixelate.com/applications/invoice_tracker/ >>> >>> I also blogged about it here: >>> http://depixelate.com/2007/5/31/taking-merb-for-a-spin >>> >>> -- >>> Zack Chandler >>> http://depixelate.com >> >> Zack- >> >> That''s kick ass, thanks for doing that! Dave Goodlad did some really >> nice work on adding a route generator to merb. I spent some time and >> integrated it into merb trunk. >> >> So if you drop into merb -i console you have a show_routes method >> available and also a url method. The url method is also available in >> your controllers and views. Note that there is a slight change to the >> router definition in router.rb due to the routing refactor. >> >> # router.rb >> # note you need top use Merb::Router instead of Merb::RouteMatcher >> now: >> Merb::Router.prepare do |r| >> r.resources :posts do |post| >> post.resources :comments >> end >> r.default_routes >> end >> >> >> $ merb -i >> merb init called >> irb(main):001:0> show_routes >> [:edit_comment, "/posts/:post_id/comments/:id/edit"] >> [:new_post, "/posts/new"] >> [:posts, "/posts"] >> [:custom_new_post, "/posts/new/:action"] >> [:edit_post, "/posts/:id/edit"] >> [:comment, "/posts/:post_id/comments/:id"] >> [:post, "/posts/:id"] >> [:new_comment, "/posts/:post_id/comments/new"] >> [:custom_new_comment, "/posts/:post_id/comments/new/:action"] >> [:comments, "/posts/:post_id/comments"] >> => nil >> irb(main):002:0> url :edit_comment, :post_id => 42, :id => 24 >> => "/posts/42/comments/24/edit" >> irb(main):003:0> url :posts >> => "/posts" >> >> >> Thanks for making your sample app available, I''m sure it will help >> people get up to speed in merbland. >> >> Cheers- >> -- Ezra Zygmuntowicz-- Lead Rails Evangelist >> -- ez at engineyard.com >> -- Engine Yard, Serious Rails Hosting >> -- (866) 518-YARD (9273) >> >> >> _______________________________________________ >> Merb-devel mailing list >> Merb-devel at rubyforge.org >> http://rubyforge.org/mailman/listinfo/merb-devel > > ---- > Bob Hutchison -- tumblelog at <http:// > www.recursive.ca/so/> > Recursive Design Inc. -- weblog at <http:// > www.recursive.ca/hutch> > -- works at <http://www.recursive.ca/> > > >-- Ezra Zygmuntowicz -- Lead Rails Evangelist -- ez at engineyard.com -- Engine Yard, Serious Rails Hosting -- (866) 518-YARD (9273)