I have the following setup
friendly_id :name, :use => :slugged
Everything works find working with an Item directly, but when its created through user.items things go wrong
Item.new(:name => "Some Name", :user_id => 1).save!
user.items.build(:name => "Some Name").save!
# doesnt set the slug, and breaks on NOT NULL constraint
Further interrogation reveals
Item.new.send(:set_slug) # works
# NoMethodError: undefined method `set_slug' for #<Item:0x007fefd94cd0d0>
Update: I tried adding a test to the project [https://github.com/matthewrudy/friendly_id/commit/7ba6821ffc835430140d6717e1c4d7af8e4b854a] and it works.
I guess this is some subtle thing to do with rails development mode.
@matthewrudy Can you confirm this issue is still valid? I couldn't find your test code.
i think this was an obscure one off issue.
so let's just close it.