Sinatra Filtering Parameters

Description

This plugin add parameter whitelisting to a Sinatra application.

Examples

require 'sinatra/filtering_parameters'
class App < Sinatra::Base
  register Sinatra::FilteringParameters

  post '/create', :allow => [ :title, :body ] do
    @post = Post.new(params)
    # ...
  end

Install

with RubyGems:

$ gem install sinatra-filtering_parameters

if using Bundler, add to your Gemfile:

gem "sinatra-filtering_parameters"

and run

$ bundle install

Copyright (c) 2012 Takeshi Yabe See LICENSE.txt for details.