# HG changeset patch # User Chris Cannam # Date 1358264399 0 # Node ID e1f00c0ed8ffec45bee890c03c44f1d1ddfda29c # Parent 5d01a630b843b390510cd8c314db3d0f7e7b7185 Map the toggle_active for attachments diff -r 5d01a630b843 -r e1f00c0ed8ff config/routes.rb --- a/config/routes.rb Tue Jan 15 12:35:27 2013 +0000 +++ b/config/routes.rb Tue Jan 15 15:39:59 2013 +0000 @@ -273,6 +273,7 @@ match 'attachments/:id/:filename', :controller => 'attachments', :action => 'show', :id => /\d+/, :filename => /.*/, :via => :get match 'attachments/download/:id/:filename', :controller => 'attachments', :action => 'download', :id => /\d+/, :filename => /.*/, :via => :get match 'attachments/download/:id', :controller => 'attachments', :action => 'download', :id => /\d+/, :via => :get + match 'attachments/toggle_active/:id', :controller => 'attachments', :action => 'toggle_active', :id => /\d+/, :via => :get match 'attachments/thumbnail/:id(/:size)', :controller => 'attachments', :action => 'thumbnail', :id => /\d+/, :via => :get, :size => /\d+/ resources :attachments, :only => [:show, :destroy]