resources/routes.rb in plezi-0.12.22 vs resources/routes.rb in plezi-0.14.0
- old
+ new
@@ -1,31 +1,14 @@
-#!/usr/bin/env ruby
-# encoding: UTF-8
+################
+# # Place your application routes here.
+# #
+# # Add your routes and controllers by order of priority.
-#########
-##
-## This file holds the routes for your application
-##
-## use the `host`, `route` and `shared_route` functions
-##
+# # I18n re-write, i.e.: `/en/home` will be rewriten as `/home`, while setting params['locale'] to "en"
+# Plezi.route "/:locale" , /^(#{I18n.available_locales.join "|"})$/ if defined? I18n
-
-# This is an optional re-write route for I18n.
-# i.e.: `/en/home` will be rewriten as `/home`, while setting params[:locale] to "en"
-route "/:locale{#{I18n.available_locales.join "|"}}/*" , false if defined? I18n
-
-# # This is an optional re-write route response formats.
# # Response format re-write, i.e.: `/xml/home` will use .xml templates automatically
# # with :locale a request might look like `/en/json/...`
-# route "/:format{html|json|xml}/*" , false
+# Plezi.route "/:format" , /^(html|json|xml)$/
-###
-# add your routes here:
-
-
-# remove this demo route and the SampleController once you want to feed Plezi your code.
-route '/', SampleController
-
-
-# this is a catch all route with a stub controller.
-# un comment the following line and replace the controller if you want a catch-all route.
-# route '*', Plezi::StubRESTCtrl
+# The root Controller
+Plezi.route '/', RootController