Sha256: e84f5cdfc5e7deaa2146b3e486d43a6cd3c719701ad65811f139ea6a76791d8d
Contents?: true
Size: 1015 Bytes
Versions: 7
Compression:
Stored size: 1015 Bytes
Contents
module MailManager class MailingListsController < MailManager::ApplicationController def index @mailing_lists = MailingList.active.order("name asc").paginate(:page => params[:page]) end def show end def new @mailing_list = MailingList.new end def edit end def create @mailing_list = MailingList.new(params[:mailing_list]) if @mailing_list.save flash[:notice] = 'Mailing List was successfully created.' redirect_to(mail_manager.mailing_lists_path) else render :action => "new" end end def update if @mailing_list.update_attributes(params[:mailing_list]) flash[:notice] = 'Mailing List was successfully updated.' redirect_to(mail_manager.mailing_lists_path) else render :action => "edit" end end def destroy @mailing_list.destroy flash[:notice] = "Mailing List was deleted." redirect_to(mail_manager.mailing_lists_url) end end end
Version data entries
7 entries across 7 versions & 1 rubygems