Displaying 1 result from an estimated 1 matches for "notificationsubscript".
2009 Dec 15
0
Problems reloading plugin extending AR model
...l called Entity, which is extended in a plugin like
this (this is in a file under lib/ which is required by init.rb of the
plugin):
http://github.com/dedomenon/madb_notifications/blob/master/lib/madb_notifications_lib.rb#L8
Entity.class_eval do
def user_subscribed_to_creation?(user_id)
NotificationSubscription.find(:first, :conditions => [
"source_filter = ? AND event = ? and source_type = ? and
destination_type = ? and destination = ?", {:entity_id =>
self.id}.to_yaml , "after_create", "Instance", "user", user_id.to_s
])
end
end
and this is then u...