Sha256: 0cc09235e55e0894ea6fb19372435fa1a5c8294347b708436775ce5680e23e38

Contents?: true

Size: 651 Bytes

Versions: 1

Compression:

Stored size: 651 Bytes

Contents

module Devmail
  class DevelopmentMailsController < ApplicationController
    respond_to :html, :xml, :json

    layout "devmail/devmail"

    def index
      @mails = DevMail.all.desc(:created_at)

      respond_with @mails
    end

    def show
      @mail = DevMail.find(params[:id])

      respond_with @mail
    end

    def destroy
      @mail = DevMail.find(params[:id])
      @mail.destroy

      redirect_to development_mails_url
    end

    def clear
      DevMail.destroy_all
      redirect_to development_mails_url
    end

    def html_part
      @mail = DevMail.find(params[:id])
      render :text => @mail.html_part
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
devmail-0.0.1 app/controllers/devmail/development_mails_controller.rb