Sha256: e41c971299cf7412f642514a24b2b44c4563398c0c6dec2d03a061313125f63c

Contents?: true

Size: 276 Bytes

Versions: 6

Compression:

Stored size: 276 Bytes

Contents

class PostsController < ApplicationController
  def show
    fetch_post
  end

  def mail
    fetch_post
    email = PostMailer.decorated_email(@post).deliver
    render text: email.body
  end

  private

  def fetch_post
    @post = Post.find(params[:id]).decorate
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
draper-1.0.0.beta6 spec/dummy/app/controllers/posts_controller.rb
draper-1.0.0.beta5 spec/dummy/app/controllers/posts_controller.rb
draper-1.0.0.beta4 spec/dummy/app/controllers/posts_controller.rb
draper-1.0.0.beta3 spec/dummy/app/controllers/posts_controller.rb
draper-1.0.0.beta2 spec/dummy/app/controllers/posts_controller.rb
draper-1.0.0.beta1 spec/dummy/app/controllers/posts_controller.rb