Closed kylefleming closed 13 years ago
Fixed a bug with STI. I was getting the following on a STI class that didn't have acts_as_citier, but it insisted on calling citier methods anyways.
citier -> Deleting SongActivity with ID 239262
citier -> Deleting back up hierarchy SongActivity
NameError: uninitialized constant SongActivity::Writable
from /Users/_m/.rvm/gems/ruby-1.9.2-head/gems/aws-s3-0.6.2/lib/aws/s3/extensions.rb:206:in const_missing_from_s3_library' from /Users/_m/.rvm/gems/ruby-1.9.2-head/bundler/gems/citier-5db02535f5f9/lib/citier/instance_methods.rb:13:in
delete'
from /Users/_m/.rvm/gems/ruby-1.9.2-head/bundler/gems/citier-5db02535f5f9/lib/citier/instance_methods.rb:27:in destroy' from /Users/_m/src/rexly/app/models/song_activity.rb:77:in
fire'
from /Users/_m/src/rexly/app/models/activity.rb:154:in perform' from (irb):36 from /Users/_m/.rvm/gems/ruby-1.9.2-head/gems/railties-3.0.9/lib/rails/commands/console.rb:44:in
start'
from /Users/_m/.rvm/gems/ruby-1.9.2-head/gems/railties-3.0.9/lib/rails/commands/console.rb:8:in start' from /Users/_m/.rvm/gems/ruby-1.9.2-head/gems/railties-3.0.9/lib/rails/commands.rb:23:in
<top (required)>'
from script/rails:6:in require' from script/rails:6:in
I have a very simple multiple-table inheritance setup with a Song and a Media class. Song inherits from Media.
However, when I try to do Song.create! it gives me the following error: ERROR: null value in column "id" violates not-null constraint
I debugged it down to citier telling media to create with a NULL id, which postgres doesn't seem to like. It (postgres) requires the id field to be left out.