Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- name = '([\w\-\_\.\+\@]+)'
- # create a new resource for the given model
- path '/{model}', :named => :create, :method => :post do |model|
- redirect( named.editor( :model => model, :name => controllers[model].create.name ) )
- end
- # update the given resource for the given model
- path '/{model}/{name}', :named => :update, :action => update_and_redirect,
- :method => :put, :match => { :name => name }
- # delete the given resource for the given model
- path '/{model}/{name}', :named => :delete, :action => delete
- :method => :delete, :match => { :name => name }
Add Comment
Please, Sign In to add comment