public
Description: When Active Record objects are saved from a form, empty fields are saved as empty strings instead of nil. This kills most validations.
Homepage:
Clone URL: git://github.com/collectiveidea/clear_empty_attributes.git
Click here to lend your support to: clear_empty_attributes and make a donation at www.pledgie.com !
brandon (author)
Thu Jan 15 22:18:57 -0800 2009
commit  3a8f3c2e09bc953e9b5b76b5101c3691cb84a9b2
tree    5d41d3edb2e994fbcb934fe1fe34d0e977b12acb
parent  e1d504c76e9a133d4f7c89748c6302066cdbd774
100644 23 lines (19 sloc) 0.723 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
require 'rubygems'
require 'echoe'
 
desc "Run all specs in spec directory"
task :test do |t|
  options = "--colour --format progress --loadby --reverse"
  files = FileList['spec/**/*_spec.rb']
  system("spec #{options} #{files}")
end
 
#Gemspec
porject_name = 'clear_empty_attributes'
Echoe.new(porject_name , '0.1') do |p|
  p.description = "Save empty strings as nil to avoid lots of problems"
  p.url = "http://github.com/collectiveidea/#{porject_name}"
  p.author = "Brandon Keepers"
  p.email = "brandon@opensoul.org"
  p.dependencies = %w[activerecord]
end
 
Dir["#{File.dirname(__FILE__)}/tasks/*.rake"].sort.each { |ext| load ext }
 
task :update_gemspec => [:manifest, :build_gemspec]