Sha256: 9324429bb0f5e39ec24754d7a84ac29f811a2f987e3deda0844079d86b2c81a3

Contents?: true

Size: 705 Bytes

Versions: 1

Compression:

Stored size: 705 Bytes

Contents

module NotifyUser
  class NotificationGenerator < Rails::Generators::NamedBase
    source_root File.expand_path('../templates', __FILE__)
    class_option :skip, default: true

    def generate_notification
      template "notification.rb.erb", "app/notifications/#{name.underscore}.rb"
    end

    def generate_view_scaffolds
      template "email_template.html.erb.erb", "app/views/notify_user/#{name.underscore}/action_mailer/notification.html.erb"
      template "mobile_sdk_template.html.erb.erb", "app/views/notify_user/#{name.underscore}/mobile_sdk/notification.html.erb"
      template "email_layout_template.html.erb.erb", "app/views/notify_user/layouts/action_mailer.html.erb"
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
notify_user-0.0.1 lib/generators/notify_user/notification/notification_generator.rb