Sha256: 4c0bcbae3d71a0eef5ec8dd9e38fa535d182a2b8193ae3a561b026a231fa4a93

Contents?: true

Size: 601 Bytes

Versions: 41

Compression:

Stored size: 601 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,
      body: 'This is a new post that has been submitted by a public user.'
    )
  end

end

Version data entries

41 entries across 41 versions & 1 rubygems

Version Path
effective_posts-0.7.1 lib/generators/templates/effective_posts_mailer_preview.rb
effective_posts-0.7.0 lib/generators/templates/effective_posts_mailer_preview.rb
effective_posts-0.6.4 lib/generators/templates/effective_posts_mailer_preview.rb
effective_posts-0.6.3 lib/generators/templates/effective_posts_mailer_preview.rb
effective_posts-2.0.4 lib/generators/templates/effective_posts_mailer_preview.rb
effective_posts-2.0.3 lib/generators/templates/effective_posts_mailer_preview.rb
effective_posts-2.0.2 lib/generators/templates/effective_posts_mailer_preview.rb
effective_posts-2.0.1 lib/generators/templates/effective_posts_mailer_preview.rb
effective_posts-2.0.0 lib/generators/templates/effective_posts_mailer_preview.rb
effective_posts-1.2.0 lib/generators/templates/effective_posts_mailer_preview.rb
effective_posts-1.1.11 lib/generators/templates/effective_posts_mailer_preview.rb
effective_posts-0.6.2 lib/generators/templates/effective_posts_mailer_preview.rb
effective_posts-1.1.10 lib/generators/templates/effective_posts_mailer_preview.rb
effective_posts-1.1.9 lib/generators/templates/effective_posts_mailer_preview.rb
effective_posts-1.1.8 lib/generators/templates/effective_posts_mailer_preview.rb
effective_posts-0.6.1 lib/generators/templates/effective_posts_mailer_preview.rb
effective_posts-1.1.7 lib/generators/templates/effective_posts_mailer_preview.rb
effective_posts-1.1.6 lib/generators/templates/effective_posts_mailer_preview.rb
effective_posts-0.6.0 lib/generators/templates/effective_posts_mailer_preview.rb
effective_posts-1.1.5 lib/generators/templates/effective_posts_mailer_preview.rb