Sha256: 56b8a6ef91cd70285e4cc4437c83826081d8e921bbac22e9dd76ca47e0a97232
Contents?: true
Size: 929 Bytes
Versions: 7
Compression:
Stored size: 929 Bytes
Contents
module MessageTrain class ParticipantsController < MessageTrain::ApplicationController before_filter :load_participants before_filter :load_participant, only: :show # GET /box/in/participants def index respond_to do |format| format.json { render :index } end end # GET /box/in/participants/1 def show respond_to do |format| format.json { render :show } end end private def load_participants current_participant = send(MessageTrain.configuration.current_user_method) method = MessageTrain.configuration.address_book_method if current_participant.respond_to? method @participants = current_participant.send(method) else @participants = current_participant.class.all end end def load_participant @participant = @participants.find(params[:id]) end end end
Version data entries
7 entries across 7 versions & 1 rubygems