Hello I have this function in my controller
def destroy
fallower = Fallower.where(user_id: 1, author_id: 2).first
fallower.destroy
respond_to do |format|
format.js
end
end
it throws me this error
ActiveRecord::StatementInvalid in FallowersController#destroy
PG::SyntaxError: ERROR: zero-length delimited identifier at or near """"
LINE 1: DELETE FROM "fallowers" WHERE "fallowers"."" = $
any idea why normal destroy function doens't work this time?
Aucun commentaire:
Enregistrer un commentaire