Sha256: bdd8ed7884862660aca0c7cbc142a08fdadb6f4bc89a49b24f6ce388a45ec069
Contents?: true
Size: 728 Bytes
Versions: 1
Compression:
Stored size: 728 Bytes
Contents
class ContactsController < ApplicationController before_filter :authenticate_user! def index @contacts = current_subject. contacts(:direction => :sent){ |q| q.alphabetic. letter(params[:letter]). search(params[:search]). merge(Tie.related_by(current_subject.relations.find_by_id(params[:relation]))) } respond_to do |format| format.html { @contacts = @contacts.paginate(:page => params[:page], :per_page => 10) } format.js { @contacts = @contacts.paginate(:page => params[:page], :per_page => 10) } format.json { render :text => @contacts.map{ |c| { 'key' => c.name, 'value' => c.actor_id.to_s } }.to_json } end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
social_stream-0.4.4 | app/controllers/contacts_controller.rb |