Padrino

Controllers

Params Whitelisting

We can provide a set of whitelisted params for a given request with:

Demo::App.controllers :admin do
  get :show, :map => "show", :params => [:foo, :bar] do
    # Only accepts params "foo" and "bar". All other params are removed.
  end
end

last updated: 2022-02-22

comments powered by Disqus