Created
April 8, 2011 21:42
-
-
Save eclubb/910804 to your computer and use it in GitHub Desktop.
HABTM with deferred save error
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Category < ActiveRecord::Base | |
has_and_belongs_to_many_with_deferred_save :posts | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/usr/local/rvm/gems/ruby-1.9.2-p136/gems/activesupport-3.0.5/lib/active_support/core_ext/module/aliasing.rb:31:in `alias_method': undefined method `before_save' for class `Category' (NameError) | |
from /usr/local/rvm/gems/ruby-1.9.2-p136/gems/activesupport-3.0.5/lib/active_support/core_ext/module/aliasing.rb:31:in `alias_method_chain' | |
from /usr/local/rvm/gems/ruby-1.9.2-p136/gems/has_and_belongs_to_many_with_deferred_save-0.2.0/lib/has_and_belongs_to_many_with_deferred_save.rb:89:in `has_and_belongs_to_many_with_deferred_save' | |
from /home/ehc/projects/dummy/app/models/category.rb:2:in `<class:Category>' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Post < ActiveRecord::Base | |
has_and_belongs_to_many_with_deferred_save :categories | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment