Sha256: 412677b80a629fd12b8fe687ccc3e3922618bd3dd04a6314ed544881ef4047aa
Contents?: true
Size: 755 Bytes
Versions: 1
Compression:
Stored size: 755 Bytes
Contents
class MailboxController < ApplicationController before_filter :get_mailbox def index end def new end def create end def show if params[:id].blank? or !["inbox","sentbox","trash"].include?params[:id] redirect_to :action => :index return end if params[:id].eql?"inbox" @conversations = @mailbox.inbox.paginate(:per_page => 8, :page => params[:page]) elsif params[:id].eql?"sentbox" @conversations = @mailbox.sentbox.paginate(:per_page => 8, :page => params[:page]) else @conversations = @mailbox.trash.paginate(:per_page => 8, :page => params[:page]) end end private def get_mailbox @mailbox = current_subject.mailbox end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
social_stream-0.4.0 | app/controllers/mailbox_controller.rb |