Sha256: ce606412ba02e1fc19af401e9ff5bcd09eb051555fad66bdfcdf54ab1925e4e9
Contents?: true
Size: 900 Bytes
Versions: 4
Compression:
Stored size: 900 Bytes
Contents
module Irwi::Support::RouteMapper # Defining wiki root mount point def wiki_root( path, config = {} ) opts = { :controller => 'wiki_pages', :root => path }.merge(config) connect( "#{path}/compare/*path", opts.merge({ :action => 'compare' }) ) # Comparing two versions of page connect( "#{path}/edit/*path", opts.merge({ :action => 'edit' }) ) # Wiki edit route connect( "#{path}/history/*path", opts.merge({ :action => 'history' }) ) # Wiki history route connect( "#{path}/*path", opts.merge({ :action => 'destroy', :conditions => { :method => :delete } }) ) # Wiki destroy route connect( "#{path}/*path", opts.merge({ :action => 'update', :conditions => { :method => :post } }) ) # Save wiki pages route connect( "#{path}/*path", opts.merge({ :action => 'show', :conditions => { :method => :get } }) ) # Wiki pages route end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
irwi-0.1.4 | lib/irwi/support/route_mapper.rb |
irwi-0.1.3 | lib/irwi/support/route_mapper.rb |
irwi-0.1.2 | lib/irwi/support/route_mapper.rb |
irwi-0.1.1 | lib/irwi/support/route_mapper.rb |