Skip to content

Instantly share code, notes, and snippets.

@neaf
Created December 20, 2009 10:36
Show Gist options
  • Select an option

  • Save neaf/260435 to your computer and use it in GitHub Desktop.

Select an option

Save neaf/260435 to your computer and use it in GitHub Desktop.
[:design, :markup, :flash, :cms].each do |type|
unless data.has_key?("include_#{type}".to_sym)
cleaned_data.reject! { |key, value| key.match(/^#{type}/) }
errors.reject! { |key, value| key.match(/^#{type}/) }
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment