we are taking our large application to beta, and I am overiding whiny nils and logging errors instead of crashing the app, as it still does not have complete testing, and third party code is being added.
If I overide missing_method in NilClass
class NilClass
def method_missing(method_name, *args,&block);end
end
create_table in migration fails, for :id column options(integer, default null, auto_increment and primary key ) is missing.
console error "Mysql::Error: You have an error in your SQL syntax;"
sql fragment in log "CREATE TABLE container_permissions (`id` , `container_id` int(11), ..."
there is no direct use of nil class in migration
NilClass#method_missing is defined in activesupport, for whiny nil, which just raises NoMethodError warning and returns strings
I have verified the behavior in 1.1.6 and edge rails
similar problem has been reported on ticket 6883 http://dev.rubyonrails.org/ticket/6883