by lgeek · 14y ago · 0 comments
def destroy
@album = Album.find_by_id params[:id]
@album.destroy
[...]
end
when the second line should have been something like: user.albums.find_by_id params[:id]
But, well, they're both pretty bad mistakes.When I wrote a journal article about it my recommendation was that Rails ship with
ActiveRecord::Base.attr_accessible(nil)
by default, because otherwise vulnerabilities of that nature were virtually inevitable.