class RelationshipsController < ApplicationController
   def create
    authorize Relationship
    leader = params[:followable_type].constantize.find(params[:followable_id])
    current_user.follow(leader)
    redirect_to leader
  end

  def destroy
    relationship = Relationship.find(params[:id])
    authorize relationship
    leader = relationship.followable
    current_user.unfollow(leader)
    redirect_to leader
  end
end
