我一直收到错误:参数数量错误(1表示0)
def destroy
@event = Event.find(params(:id))
@event.destroy
flash[:success] = "Event destroyed."
redirect_to events_path
end
Run Code Online (Sandbox Code Playgroud)
我试图破坏@event并且它不起作用,因为@event = Event.find(params(:id))具有错误的参数数量.我究竟做错了什么?
| 归档时间: |
|
| 查看次数: |
1350 次 |
| 最近记录: |