Sha256: 3e0c633c2466e948af836167e1c22ce0cf19f45885355c602d2e987125c0185a
Contents?: true
Size: 921 Bytes
Versions: 10
Compression:
Stored size: 921 Bytes
Contents
module PostmanMta class ConversationsController < ApplicationController def index render conversation.index(permitted_params) end [:inbox, :sent, :spam, :trash].each do |folder| define_method folder do render conversation.folder(folder, permitted_params) end end def show render conversation.find(params[:id]) end def read render conversation.mark_as_read(permitted_params) end def unread render conversation.mark_as_unread(permitted_params) end def destroy render conversation.move_to_trash(params[:id]) end def move render conversation.move(permitted_params) end def search render conversation.search(permitted_params) end private def conversation @conversation ||= PostmanMta::Conversation.new end def permitted_params params.permit! end end end
Version data entries
10 entries across 10 versions & 1 rubygems