Registry / other / rails-observers

rails-observers

JSON →
library0.1.5rbrubygemsunverified

Rails observer (removed from core in Rails 4.0)

gem install rails-observers
INSTALL
IMPORT
SIG · RAILS-OBSERVERS
R
rails-observers
otherrubyv0.1.5
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Rails::Observers
require 'rails/observers'

Observe model lifecycle events

require 'rails/observers' class UserObserver < ActiveRecord::Observer observe :user def after_create(user) puts "User #{user.name} created" end end
Debug
Known issues
breakingObservers were removed from Rails core in 4.0; this gem is a legacy extraction.
fix
Consider using ActiveSupport::Notifications or callbacks instead.
affects: >= 0.1.0
Upgrade
Version history
0.1.5latest on RubyGems
Audit
Dependencies

No dependency data recorded yet.

Agent activity
8 hits · last 30 days
node
8
Resources
rails-observers — gem install rails-observers · libregistry