Class: Admin::ConversationsController
- Inherits:
-
BaseController
- Object
- BaseController
- Admin::ConversationsController
- Defined in:
- app/controllers/admin/conversations_controller.rb
Instance Method Summary collapse
Instance Method Details
#complete ⇒ Object
4 5 6 7 8 9 |
# File 'app/controllers/admin/conversations_controller.rb', line 4 def complete @conversation = Conversation.find(params[:id]) @conversation.status = "closed" @conversation.save redirect_to :action => :show end |
#index ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'app/controllers/admin/conversations_controller.rb', line 11 def index @requested_scope = params[:search] @requested_scope ||= 'open' @conversations = case @requested_scope when 'all' Conversation.all when 'closed' Conversation.closed.all else Conversation.open.all end end |