尝试编辑歌曲时出现以下错误:
ActiveRecord::RecordNotFound in SongsController#show
Couldn't find Song with id=edit
Extracted source (around line #69):
def set_song
@song = Song.find(params[:id])
end
def song_params
要访问代码库/轻松排除故障,请参阅:www.github.com/apane/leap
对于它的价值,我刚刚安装并让 CanCan 工作,但不幸的是,我随后遇到了上述错误。
歌曲(资源)路线:
songs GET /songs(.:format) songs#index
POST /songs(.:format) songs#create
new_song GET /songs/new(.:format) songs#new
edit_song GET /songs/:id/edit(.:format) songs#edit
song GET /songs/:id(.:format) songs#show
PATCH /songs/:id(.:format) songs#update
PUT /songs/:id(.:format) songs#update
DELETE /songs/:id(.:format) songs#destroy
songs_index GET /songs/index(.:format) songs#index
songs_show GET /songs/show(.:format) songs#show
songs_new GET /songs/new(.:format) songs#new
songs_edit GET /songs/edit(.:format) songs#edit
contact GET /contact(.:format) songs#contact
faq GET /faq(.:format) songs#faq
root GET / songs#index