Sha256: 0272cfcab7f1d76232eb0a3526a6c8a8813506bff2acecb0a72f1a408e5563cf

Contents?: true

Size: 1.9 KB

Versions: 12

Compression:

Stored size: 1.9 KB

Contents

===============================================================================

Some setup you must do manually if you haven't yet:

  1. Ensure you have defined default url options in your environments files. Here
     is an example of default_url_options appropriate for a development environment
     in config/environments/development.rb:

       config.action_mailer.default_url_options = { host: 'localhost', port: 3000 }

     In production, :host should be set to the actual host of your application.

  2. Setup your target model (e.g. app/models/user.rb)

   - Add including statement and acts_as_target definition to your target model

       include ActivityNotification::Target
       acts_as_target email: :email, email_allowed: :confirmed_at

   - Add notification routing to config/routes.rb

       (simply)      notify_to :users
       (with devise) notify_to :users, with_devise: :users

   - You can override several methods in your target model

       e.g. notification_index, notification_email_allowed?

  3. Setup your notifiable model (e.g. app/models/comment.rb)

    - Add including statement and acts_as_notifiable definition to your notifiable model
     
       include ActivityNotification::Notifiable
       acts_as_notifiable :users,
         targets: :custom_notification_users,
         group: :article,
         notifier: :user,
         email_allowed: :custom_notification_email_to_users_allowed?,
         notifiable_path: :custom_notifiable_path

   - You can override several methods in your notifiable model

       e.g. notifiable_path, notification_email_allowed?

  4. You can copy ActivityNotification views (for customization) to your app by running:

       rails g activity_notification:views

  5. You can customize locale file which is generated as following file:

       config/locals/activity_notification.en.yml

===============================================================================

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
activity_notification-1.4.1 lib/generators/templates/README
activity_notification-1.4.0 lib/generators/templates/README
activity_notification-1.3.0 lib/generators/templates/README
activity_notification-1.2.1 lib/generators/templates/README
activity_notification-1.2.0 lib/generators/templates/README
activity_notification-1.1.0 lib/generators/templates/README
activity_notification-1.0.2 lib/generators/templates/README
activity_notification-1.0.1 lib/generators/templates/README
activity_notification-1.0.0 lib/generators/templates/README
activity_notification-0.0.10 lib/generators/templates/README
activity_notification-0.0.9 lib/generators/templates/README
activity_notification-0.0.8 lib/generators/templates/README