Posted By

andyh on 01/24/07


rails ruby

Versions (?)

Who likes this?

1 person have marked this snippet as a favorite


with_options to DRY up route creation

 / Published in: Ruby

used to remove unnecessary duplication of code. Code is from Jamis Buck (

  1. map.with_options :controller => "message" do |msg|
  2. msg.create_message "/msg/create/:id", :action => "create"
  3. msg.delete_message "/msg/delete/:id", :action => "delete"
  4. msg.message "/msg/:id", :action => "get"
  5. end

Report this snippet  

You need to login to post a comment.