mirror of
https://github.com/drapergem/draper
synced 2023-03-27 23:21:17 -04:00
20 lines
357 B
Ruby
20 lines
357 B
Ruby
class PostsController < ApplicationController
|
|
decorates_assigned :post
|
|
|
|
def show
|
|
@post = Post.find(params[:id])
|
|
end
|
|
|
|
def mail
|
|
post = Post.find(params[:id])
|
|
email = PostMailer.decorated_email(post).deliver
|
|
render text: email.body
|
|
end
|
|
|
|
private
|
|
|
|
def goodnight_moon
|
|
"Goodnight, moon!"
|
|
end
|
|
helper_method :goodnight_moon
|
|
end
|