undefined method `toggle!' for #:ActiveRecord_AssociationRelation: : I've just got this problem in my controller ,and I don't understand what's going on.
It returns me undefined method `toggle!' for Like::ActiveRecord_AssociationRelation: Or for my create action every thing works but not with the update action.
This is a basic like controller to like and unlike an event,someone and so one.

    class LikesController < ApplicationController

	before_action :authenticate_user!

	def create
		@project=Project.find(params[:project_id])
		@like= @project.likes.where(user:current_user).first_or_initialize( name:current_user.first_name)
		@like.toggle(:heart)
		@like.save 
		Notification.create(user:current_user, user_name: current_user.first_name, action:'like', recipient:@project.subject)
	    redirect_to project_path(@project)
	end



	def update
		@project=Project.find(params[:project_id])
		@like= @project.likes.where(user:current_user)
		@like.toggle(:heart)
		@like.save
		Notification.create(user:current_user, user_name: current_user.first_name, action:'Unlike', recipient:@project.subject)	
	    redirect_to project_path(@project)	
	end 
    end


