Class: RustyEngine::ApplicationController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/rusty_engine/application_controller.rb,
app/controllers/rusty_engine/recentmessage_controller.rb

Direct Known Subclasses

ProfilesController

Instance Method Summary collapse

Instance Method Details

#indexObject



5
6
7
8
9
10
11
12
13
14
15
# File 'app/controllers/rusty_engine/recentmessage_controller.rb', line 5

def index
  if session[:user_id] = user.id
    @conversation = Conversation.find(params[:conversation_last])
    @messages = @conversation.messages
    i = 0
    begin
      @messages[i]
      i += 1
    end until i > 2
  end 
end