Sha256: e62500735095b646099937185f2dd004aaa4d2e6b12be74bce954f8715b2fb80

Contents?: true

Size: 491 Bytes

Versions: 15

Compression:

Stored size: 491 Bytes

Contents

# Preview all emails at http://localhost:3000/rails/mailers/
class <%= file_name.camelcase %>CampaignPreview < ActionMailer::Preview<% steps.each do |step| %><% step, wait = step.split(":") %>
  def <%= step %>
    <%= file_name.camelcase %>Campaign.<%= step %>(user)
  end
<% end %>
  private

  def user
    <%= Heya.config.user_type %>.where(id: params[:user_id]).first || <%= Heya.config.user_type %>.first || <%= Heya.config.user_type %>.new(email: "user@example.com").freeze
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
heya-0.12.0 lib/generators/heya/campaign/templates/preview.rb.tt
heya-0.11.0 lib/generators/heya/campaign/templates/preview.rb.tt
heya-0.10.0 lib/generators/heya/campaign/templates/preview.rb.tt
heya-0.9.0 lib/generators/heya/campaign/templates/preview.rb.tt
heya-0.8.0 lib/generators/heya/campaign/templates/preview.rb.tt
heya-0.7.0 lib/generators/heya/campaign/templates/preview.rb.tt
heya-0.6.1 lib/generators/heya/campaign/templates/preview.rb.tt
heya-0.6.0 lib/generators/heya/campaign/templates/preview.rb.tt
heya-0.5.3 lib/generators/heya/campaign/templates/preview.rb.tt
heya-0.5.2 lib/generators/heya/campaign/templates/preview.rb.tt
heya-0.5.1 lib/generators/heya/campaign/templates/preview.rb.tt
heya-0.5.0 lib/generators/heya/campaign/templates/preview.rb.tt
heya-0.4.0 lib/generators/heya/campaign/templates/preview.rb.tt
heya-0.3.0 lib/generators/heya/campaign/templates/preview.rb.tt
heya-0.2.1 lib/generators/heya/campaign/templates/preview.rb.tt