1
0
postdoc/app/controllers/emails_controller.rb

18 lines
362 B
Ruby
Raw Normal View History

2020-12-06 20:49:03 +01:00
class EmailsController < ApplicationController
before_action :set_email, only: [:show, :mark_as_read, :body_preview]
def show
@selected = params[:selected]
@email.mark_as_read! unless @email.read?
end
def body_preview
render(layout: false)
end
def set_email
@email = Email.find(params[:id])
@mailbox = @email.mailbox
end
end