Code Monkey home page Code Monkey logo

actsassubscribeable's Introduction

ActsAsSubscribeable
===================

The acts_as_subscribeable plugin is a generator and plugin to allow the subscription based email notification 
(or other system if you choose to implement it differently) of changes in the model you specify as a subscribeable
object. The associations are polymorphic and can pertain to any model type.

Prerequisites
=============
Rails 1.2.6+
A User model that includes a field called email (Restful Auth compatible!)

Installing the plugin
=====================
  -- Get the plugin:
    ./script/plugin install svn://railsjitsu.com/var/svn/repos/acts_as_subscribeable/trunk/
  -- Run:
    ./script/generate acts_as_subscribeable_installation
  -- Add a has_many :subscriptions to your User model
  -- Configure the mailer initializer placed in /config/initializers/mailer.rb for your mail server

  NOTES:
  ======
  This will install the migration file and mailer initializer for the plugin.

Generating Subscribebale Models
===============================
  -- Create a model
  -- Add the hook:
    acts_as_subscribeable
  
  -- Run:
    ./script/generate subscribeable_model MODEL_NAME

  -- Add your observer hook in your environment.rb file
    config.active_record.observers = :MODEL_NAME_observer  

  NOTES:
  ======
  This will generate an observer and mailer for your model and hook in the observer. It defaults to an after_update 
  callback but you can add as many as you need or customize the observer to watch a parent model to alert on child 
  creation instead.

Customizing your email notification
===============================
  -- Customize the generated send_email_notification.html.erb file in your MODEL_NAME_mailer views directory to suit your needs  and the MODEL_NAME_mailer.rb mailer in your Models directory.

Copyright (c) 2007 E. James O'Kelly, released under the MIT license
www.railsjitsu.com

actsassubscribeable's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.