Sha256: 00e13510c4aeefa0b5cb5e5283058db46d0119dffaafc032e2e968a0d240ce95
Contents?: true
Size: 604 Bytes
Versions: 2
Compression:
Stored size: 604 Bytes
Contents
# In Rails 4.1 and above, visit: # http://localhost:3000/rails/mailers # to see a preview of the following 3 emails: class EffectivePostsMailerPreview < ActionMailer::Preview def post_submitted_to_admin Effective::PostsMailer.post_submitted_to_admin(build_preview_post) end protected def build_preview_post post = Effective::Post.new( title: 'An example post', category: EffectivePosts.categories.first.presence || 'posts', published_at: Time.zone.now, draft: true, content: 'This is a new post that has been submitted by a public user.' ) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
effective_posts-0.5.0 | lib/generators/templates/effective_posts_mailer_preview.rb |
effective_posts-0.4.7 | lib/generators/templates/effective_posts_mailer_preview.rb |