Skip to content
This repository has been archived by the owner on Jan 16, 2020. It is now read-only.
/ event_system Public archive

Rails plugin for dynamic site updates triggered by custom model changes

Notifications You must be signed in to change notification settings

enricogenauck/event_system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Event System

Description

Event System is a Rails plugin for dynamic site updates triggered by custom model changes.

Install

script/plugin install github.com/enricogenauck/event_system.git

Prerequisites

  • JQuery

Simple usage

In your model:

class Message < ActiveRecord:Base
  creates_event

  [...]
end

In your controller:

class MessagesController < ApplicationController
  handles :message, :index

  def index
    @messages = Message.all
  end
end

In your view:

<%= integrate_event_system %>

<div class="event_system_container">
  <%= render @messages %>
</div>

Given you have the typical partial like _message.html.erb defined, from now on the newly created messages will be inserted in your view by periodically fired ajax requests.

Authors

About

Rails plugin for dynamic site updates triggered by custom model changes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages