Sha256: cb40b54da26c3179e31a95694eb861a4a6bd8adcc197046289842200b0e90815
Contents?: true
Size: 695 Bytes
Versions: 75
Compression:
Stored size: 695 Bytes
Contents
class FollowersController < ApplicationController before_filter :authenticate_user!, :except => :index respond_to :html, :js def index @followings = current_subject.following_actor_objects.includes(:actor) @followers = current_subject.followers respond_to do |format| format.html format.json { render :text => to_json(@followers) } end end def update current_contact.relation_ids = Array.wrap(Relation::Follow.instance.id) respond_to :js end def destroy current_contact.relation_ids = Array.new respond_to :js end private def current_contact @contact ||= current_subject.sent_contacts.find params[:id] end end
Version data entries
75 entries across 75 versions & 2 rubygems