Commit c6d98432 by slainer68

format parameter takes a regexp

parent b1350140
...@@ -38,7 +38,7 @@ As usual, in your Gemfile... ...@@ -38,7 +38,7 @@ As usual, in your Gemfile...
param! :categories, Array param! :categories, Array
param! :sort, String, default: "title" param! :sort, String, default: "title"
param! :order, String, in: %w(asc desc), transform: :downcase, default: "asc" param! :order, String, in: %w(asc desc), transform: :downcase, default: "asc"
param! :price, String, format: "[<\=>]\s*\$\d+" param! :price, String, format: /[<\=>]\s*\$\d+/
# Access the parameters using the params object (like params[:q]) as you usually do... # Access the parameters using the params object (like params[:q]) as you usually do...
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment