这是我试图做的:
irb(main):008:0> c.title = "Another Test"
=> "Another Test"
irb(main):009:0> c.save
(0.7ms) BEGIN
FriendlyId::Slug Load (1.0ms) SELECT "friendly_id_slugs".* FROM "friendly_id_slugs" WHERE "friendly_id_slugs"."sluggable_type" = 'Contest' AND (slug = 'another-test-challenge' OR slug LIKE 'another-test-challenge--%') AND (sluggable_id <> 64) ORDER BY LENGTH(slug) DESC, slug DESC LIMIT 1
(0.5ms) ROLLBACK
=> false
当我尝试在我的应用程序中执行此操作时(即使用编辑表单),我遇到了这个问题:
2013-01-10T17:53:47+00:00 app[web.2]: cache: [POST /mycontroller/this-is-the-old-title] invalidate, pass
我似乎无法编辑我的对象的标题,这也相当于与我的对象关联的友好 id。