鉴于此代码: class Word < ActiveRecord::Base
has_and_belongs_to_many :definitions
end
class Definition < ActiveRecord::Base
has_and_belongs_to_many :word
validates :word, presence: true
e
我安装了Devise和Cancan。我的用户具有以下选项的角色super_admin: def initialize(user)
user ||= User.new # guest user
can :manage, :all
end
除删除元素外,其他所有方法都行得通。当我试图删除对象: <%= link_to 'Destroy', place, :method =>