mailr/app/controllers/folders_controller.rb

27 lines
505 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
theme :theme_resolver
2009-02-07 22:22:25 +01:00
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