nagybence-railhead_sanitize 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -1,16 +1,16 @@
1
- = SimpleSanitize
1
+ = RailheadSanitize
2
2
 
3
- SimpleSanitize is a Ruby on Rails plugin that automatically strips tags from input fields.
3
+ RailheadSanitize is a Ruby on Rails plugin that automatically strips tags from input fields.
4
4
 
5
5
  == Installation
6
6
 
7
7
  Installation is available as gem (recommended):
8
8
 
9
- config.gem "nagybence-simple_sanitize", :lib => "simple_sanitize", :source => "http://gems.github.com"
9
+ config.gem 'nagybence-railhead_sanitize', :lib => 'railhead_sanitize', :source => 'http://gems.github.com'
10
10
 
11
11
  Or as Rails plugin:
12
12
 
13
- $ ruby script/plugin install git://github.com/nagybence/simple_sanitize.git
13
+ $ ruby script/plugin install git://github.com/nagybence/railhead_sanitize.git
14
14
 
15
15
  == Usage
16
16
 
@@ -18,12 +18,12 @@ It works fully automatically, but there are two options to modify the default be
18
18
 
19
19
  Does not strip a parameter:
20
20
 
21
- sanitize_fields :except => [:title]
21
+ auto_sanitize :except => [:title]
22
22
 
23
23
  Uses 'sanitize' instead of 'strip_tags':
24
24
 
25
- sanitize_fields :allow_tags => [:body]
25
+ auto_sanitize :allow_tags => [:body]
26
26
 
27
27
  == License
28
28
 
29
- Copyright (c) 2008 Bence Nagy (nagybence@tipogral.hu), released under the MIT license.
29
+ Copyright (c) 2008-2009 Bence Nagy (nagybence@tipogral.hu), released under the MIT license.
data/init.rb CHANGED
@@ -1 +1 @@
1
- require 'simple_sanitize'
1
+ require 'railhead_sanitize'
@@ -20,7 +20,7 @@ module RailheadSanitize
20
20
 
21
21
  def sanitize_fields
22
22
  self.class.columns.each do |column|
23
- next unless (column.type == :string || column.type == :text)
23
+ next unless column.type == :string or column.type == :text
24
24
  field = column.name.to_sym
25
25
  value = self[field] && self[field].strip
26
26
  if sanitize_options && sanitize_options[:except].include?(field)
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "railhead_sanitize"
3
- s.version = "0.2.0"
3
+ s.version = "0.2.1"
4
4
  s.date = "2009-01-27"
5
5
  s.summary = "RailheadSanitize is a Ruby on Rails plugin that automatically strips tags from input fields."
6
6
  s.email = "nagybence@tipogral.hu"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nagybence-railhead_sanitize
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bence Nagy