Sha256: 118a01e21d4fd22aa002de6da5f812bd6b0b3a4e070334efc7fc2a38f3112dfb
Contents?: true
Size: 686 Bytes
Versions: 3
Compression:
Stored size: 686 Bytes
Contents
class PostsController < ApplicationController presents :post, :with => StrongPresenter::Presenter, :only => :show presents :post, :with => PostPresenter, :only => :show do |presenter| presenter.permit!(:permit_to_present, :peek_a_boo) end presents :post, :with => StrongPresenter::Presenter, :only => [:index] presents :post, :with => StrongPresenter::Presenter, :except => [:show, :new] def show @post = Post.find(params[:id]) end def mail post = Post.find(params[:id]) email = PostMailer.presented_email(post).deliver render text: email.body end private def goodnight_moon "Goodnight, moon!" end helper_method :goodnight_moon end
Version data entries
3 entries across 3 versions & 1 rubygems