Skip to content

Instantly share code, notes, and snippets.

View gaaady's full-sized avatar

Gady gaaady

  • Opinya
  • Israel
View GitHub Profile
class FollowsController < ApplicationController
def create
@user = User.find(params[:brewer_id])
current_user.follow(@user)
end
def destroy
@user = User.find(params[:brewer_id])
current_user.stop_following(@user)
class FollowsController < ApplicationController
def create
@followable = find_followable
current_user.follow(@followable)
redirect_to (@followable)
end
def destroy
@followable = find_followable