7
8
9
10
11
12
13
14
15
16
17
18
19
|
# File 'lib/translation_cms/routers/testimonials_router.rb', line 7
def load
Rails.application.routes.draw do
if Structure.table_exists? && (root = Structure.with_type(StructureType.testimonials).first)
localized do
scope page: /\d{1,5}/, per: /\d{1,3}/, id: /\d{1,5}/,
format: false, defaults: { format: 'html' } do
get "/#{root.slug}(/p/:page)(/per/:per)", to: 'testimonials#index', as: :testimonials
get "/#{root.slug}/:id(/p/:page)(/per/:per)", to: 'testimonials#search', as: :search_testimonials
end
end
end
end
end
|