mailr/app/controllers/folders_controller.rb

25 lines
480 B
Ruby
Raw Normal View History

2009-02-07 22:32:57 +01:00
require 'ezcrypto'
2009-02-07 22:22:25 +01:00
class FoldersController < ApplicationController
include ImapUtils
before_filter :login_required
before_filter :load_imap_session
after_filter :close_imap_session
layout 'public'
def index
@folders = @mailbox.folders
end
def create
@mailbox.create_folder(CDF::CONFIG[:mail_inbox] + '.' + params[:folder])
redirect_to folders_path
end
def destroy
@mailbox.delete_folder params[:id]
redirect_to folders_path
end
end