Skip to content

Instantly share code, notes, and snippets.

View mkdynamic's full-sized avatar

Mark Dodwell mkdynamic

View GitHub Profile
@mkdynamic
mkdynamic / ControllerFormAttributes.rb
Created March 11, 2012 23:46 — forked from TheEmpty/ControllerFormAttributes.rb
Trying some different ways to secure a Rails application with user input
module ControllerFormAttributes
def self.included(base)
base.extend ClassMethods
end
module ClassMethods
def form_params_accessors(type, attributes = [])
@form_params_accessors ||= {}
@form_params_accessors[type] ||= attributes
end