spec/dummy/app/controllers/posts_controller.rb in draper-1.0.0.beta6 vs spec/dummy/app/controllers/posts_controller.rb in draper-1.0.0
- old
+ new
@@ -1,17 +1,11 @@
class PostsController < ApplicationController
def show
- fetch_post
+ @post = Post.find(params[:id]).decorate
end
def mail
- fetch_post
- email = PostMailer.decorated_email(@post).deliver
+ post = Post.find(params[:id])
+ email = PostMailer.decorated_email(post).deliver
render text: email.body
- end
-
- private
-
- def fetch_post
- @post = Post.find(params[:id]).decorate
end
end