Class: Raif::ConversationsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- ApplicationController
- Raif::ConversationsController
- Defined in:
- app/controllers/raif/conversations_controller.rb
Instance Method Summary collapse
Methods inherited from ApplicationController
Instance Method Details
#index ⇒ Object
6 7 8 |
# File 'app/controllers/raif/conversations_controller.rb', line 6 def index @conversations = conversations_scope end |
#show ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'app/controllers/raif/conversations_controller.rb', line 10 def show @conversations = conversations_scope @conversation = if params[:id] == "latest" if @conversations.any? @conversations.first else conversation = build_new_conversation conversation.save! conversation end else @conversations.find(params[:id]) end end |