No commit activity in last 3 years
No release in over 3 years
This adds filter to use only those parameters that are allowed to a Sinatra application.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 0.9.2
~> 3.0
~> 2.4

Runtime

~> 1.3
 Project Readme

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

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