Skip to content

Instantly share code, notes, and snippets.

@Sporky023
Created August 11, 2011 20:49
Show Gist options
  • Save Sporky023/1140728 to your computer and use it in GitHub Desktop.
Save Sporky023/1140728 to your computer and use it in GitHub Desktop.
> p = Post.create(:name => "foo")
=> #<Post id: 1, name: "foo", created_at: "2011-08-11 20:03:12", updated_at: "2011-08-11 20:03:12">
> t = Tag.create(:name => "bar")
=> #<Tag id: 1, name: "bar", created_at: "2011-08-11 20:03:20", updated_at: "2011-08-11 20:03:20">
> tagging = Tagging.create(:post => p, :tag => t)
NoMethodError: undefined method `text?' for nil:NilClass
from ... lib/active_support/whiny_nil.rb:48:in `method_missing'
from ... lib/active_record/validations/uniqueness.rb:57:in `build_relation'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment