I am trying to do some tricks with routes. And I need to use optional route parameter in Padrino. I googled that solution for this are "()" parenthesis. I couldn't find in docs.
But when I try to use
get :sort, :with => [:order, :asc, '(:search)'] do
them, mustermann is giving me classic error for missing parameter
cannot expand with keys [:asc, :order], possible expansions: [:asc, :order, :search]
when I try to call
url(:sbirka, :sort, :order => "id", :asc => @asc)
I also tried different style
get :sort, "/:order/:asc/(:search)" do
with the same result
Please any suggestions how to do this?