Module: Umlaut::Routes::RouteSets
- Included in:
- Umlaut::Routes
- Defined in:
- lib/umlaut/routes.rb
Instance Method Summary collapse
-
#a_z ⇒ Object
some special direct links to A-Z type searches, including legacy redirects for SFX-style urls, to catch any bookmarks.
- #admin ⇒ Object
- #export_email ⇒ Object
- #javascript ⇒ Object
- #link_router ⇒ Object
- #open_search ⇒ Object
- #permalinks ⇒ Object
-
#resolve ⇒ Object
This is a legacy wild controller route that’s not recommended for RESTful applications.
- #resources ⇒ Object
-
#root ⇒ Object
for now include root generation in Umlaut auto-generation.
- #search ⇒ Object
Instance Method Details
#a_z ⇒ Object
some special direct links to A-Z type searches, including legacy redirects for SFX-style urls, to catch any bookmarks.
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/umlaut/routes.rb', line 53 def a_z add_routes do || # Special one for alpha list match 'journal_list(/:id(/:page))' => 'search#journal_list', :defaults => { :page => '1', :id => 'A' } # Catch redirected from SFX A-Z and citation linker urls # v2 A-Z links redirected to umlaut, point to journal_list # code in journal_list filter picks out SFX URL vars for # letter. match '/resolve/azlist/default' => 'search#journal_list', :page => 1, :id => 'A' # SFX v3 A-Z list url format match 'resolve/az' => 'search#journal_list', :page => 1, :id => 'A' end end |
#admin ⇒ Object
153 154 155 156 157 158 159 |
# File 'lib/umlaut/routes.rb', line 153 def admin add_routes do || namespace "admin" do match 'service_errors(/:service_id)' => "service_errors#index" end end end |
#export_email ⇒ Object
104 105 106 107 108 109 110 111 112 |
# File 'lib/umlaut/routes.rb', line 104 def export_email add_routes do || # ExportEmailController still uses rails 2.0 style 'wildcard' routes, # TODO tighten this up to only match what oughta be matched. # Note: This route will make all actions in this controller accessible via GET requests. match 'export_email(/:action(/:id(.:format)))' => "export_email" end end |
#javascript ⇒ Object
134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 |
# File 'lib/umlaut/routes.rb', line 134 def javascript add_routes do || # Legacy location for update_html.js used by JQuery Content Utility # to embed JS on external sites. Redirect to new location. # Intentionally non-fingerprinted, most efficient thing # we can do in this case is let the web server take care # of Last-modified-by etc headers. match 'javascripts/jquery/umlaut/update_html.js' => redirect("/assets/umlaut/update_html.js", :status => 301) # The loader doens't work _exactly_ like the new umlaut-ui.js, but # it's close enough that it'll work better redirecting than just # 404'ing. match 'js_helper/loader' => redirect("/assets/umlaut_ui.js") match 'images/spinner.gif' => redirect("/assets/spinner.gif") end end |
#link_router ⇒ Object
94 95 96 97 98 99 100 101 102 |
# File 'lib/umlaut/routes.rb', line 94 def link_router add_routes do || # LinkRouterController still uses rails 2.0 style 'wildcard' routes, # TODO tighten this up to only match what oughta be matched. # Note: This route will make all actions in this controller accessible via GET requests. match 'link_router(/:action(/:id(.:format)))' => "link_router" end end |
#open_search ⇒ Object
84 85 86 87 88 89 90 91 92 |
# File 'lib/umlaut/routes.rb', line 84 def open_search add_routes do || # OpenSearchController still uses rails 2.0 style 'wildcard' routes, # TODO tighten this up to only match what oughta be matched. # Note: This route will make all actions in this controller accessible via GET requests. match 'open_search(/:action(/:id(.:format)))' => "open_search" end end |
#permalinks ⇒ Object
45 46 47 48 49 |
# File 'lib/umlaut/routes.rb', line 45 def permalinks add_routes do || match 'go/:id' => 'store#index' end end |
#resolve ⇒ Object
This is a legacy wild controller route that’s not recommended for RESTful applications. Note: This route will make all actions in every controller accessible via GET requests. match ‘:controller(/:action(/:id(.:format)))’
74 75 76 77 78 79 80 81 82 |
# File 'lib/umlaut/routes.rb', line 74 def resolve add_routes do || # ResolveController still uses rails 2.0 style 'wildcard' routes, # TODO tighten this up to only match what oughta be matched. # Note: This route will make all actions in this controller accessible via GET requests. match 'resolve(/:action(/:id(.:format)))' => "resolve" end end |
#resources ⇒ Object
114 115 116 117 118 119 120 121 122 |
# File 'lib/umlaut/routes.rb', line 114 def resources add_routes do || # ResourceController still uses rails 2.0 style 'wildcard' routes, # TODO tighten this up to only match what oughta be matched. # Note: This route will make all actions in this controller accessible via GET requests. match 'resource(/:action(/:id(.:format)))' => "resource" end end |
#root ⇒ Object
for now include root generation in Umlaut auto-generation
39 40 41 42 43 |
# File 'lib/umlaut/routes.rb', line 39 def root add_routes do || root :to => "search#index" end end |
#search ⇒ Object
124 125 126 127 128 129 130 131 132 |
# File 'lib/umlaut/routes.rb', line 124 def search add_routes do || # SearchController still uses rails 2.0 style 'wildcard' routes, # TODO tighten this up to only match what oughta be matched. # Note: This route will make all actions in this controller accessible via GET requests. match 'search(/:action(/:id(.:format)))' => "search" end end |