我按照说明运行了迁移并将其添加到我的模型中,但是我一直生成以下错误。不确定发生了什么。照片表中的我的slug列也充满了独特的价值。
我正在运行导轨4。
感谢您提前发表任何意见。
photo.rb
include FriendlyId
friendly_id :name, use: :slugged
控制台中的错误
NameError: uninitialized constant Photo::FriendlyId
from /Users/jhorsch/Repos/horschgallery2/app/models/photo.rb:4:in `<class:Photo>'
from /Users/jhorsch/Repos/horschgallery2/app/models/photo.rb:1:in `<top (required)>'
from /Users/jhorsch/Repos/horschgallery2/app/admin/photo.rb:1:in `<top (required)>'
from /Users/jhorsch/.rvm/gems/ruby-2.0.0-p247/bundler/gems/active_admin-ceb096c5ed4f/lib/active_admin/application.rb:179:in `load'