Skip to content
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This trivial Rails plugin makes ActiveRecord to store NULL values to the database instead of empty strings. Only :string and :text attributes that allow NULLs are affected.

# nullify all nullable attributes except :name
class Group < ActiveRecord::Base
  acts_as_nullifier :except => :name
end

# nullify only :first_name and :last_name
class User < ActiveRecord::Base
  acts_as_nullifier :only => [:first_name, :last_name]
end

Copyright © 2009 Dmitri Goutnik, released under the MIT license.

About

Rails plugin that makes ActiveRecord to store NULL values to the database instead of empty strings.

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages