mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 23:58:31 -05:00
match is old school (cc @EvilTrout)
This commit is contained in:
parent
fe000cd9c2
commit
42da8a9246
1 changed files with 8 additions and 8 deletions
|
@ -164,15 +164,15 @@ Discourse::Application.routes.draw do
|
|||
resources :emojis, constraints: AdminConstraint.new
|
||||
|
||||
# They have periods in their URLs often:
|
||||
get 'site_texts' => 'site_texts#index'
|
||||
match 'site_texts/(:id)' => 'site_texts#show', :constraints => { :id => /[0-9a-zA-Z\_\.\-]+/ }, via: :get
|
||||
match 'site_texts/(:id)' => 'site_texts#update', :constraints => { :id => /[0-9a-zA-Z\_\.\-]+/ }, via: :put
|
||||
match 'site_texts/(:id)' => 'site_texts#revert', :constraints => { :id => /[0-9a-zA-Z\_\.\-]+/ }, via: :delete
|
||||
get 'site_texts' => 'site_texts#index'
|
||||
get 'site_texts/(:id)' => 'site_texts#show', constraints: { id: /[\w.\-]+/i }
|
||||
put 'site_texts/(:id)' => 'site_texts#update', constraints: { id: /[\w.\-]+/i }
|
||||
delete 'site_texts/(:id)' => 'site_texts#revert', constraints: { id: /[\w.\-]+/i }
|
||||
|
||||
get 'email_templates' => 'email_templates#index'
|
||||
match 'email_templates/(:id)' => 'email_templates#show', :constraints => { :id => /[0-9a-z\_\.]+/ }, via: :get
|
||||
match 'email_templates/(:id)' => 'email_templates#update', :constraints => { :id => /[0-9a-z\_\.]+/ }, via: :put
|
||||
match 'email_templates/(:id)' => 'email_templates#revert', :constraints => { :id => /[0-9a-z\_\.]+/ }, via: :delete
|
||||
get 'email_templates' => 'email_templates#index'
|
||||
get 'email_templates/(:id)' => 'email_templates#show', constraints: { id: /[0-9a-z_.]+/ }
|
||||
put 'email_templates/(:id)' => 'email_templates#update', constraints: { id: /[0-9a-z_.]+/ }
|
||||
delete 'email_templates/(:id)' => 'email_templates#revert', constraints: { id: /[0-9a-z_.]+/ }
|
||||
end
|
||||
|
||||
resources :embeddable_hosts, constraints: AdminConstraint.new
|
||||
|
|
Loading…
Reference in a new issue