Sha256: 8a8f651992053e24474cf649209d0d25dc95a5482ad46df6f18abef37009059a
Contents?: true
Size: 728 Bytes
Versions: 1
Compression:
Stored size: 728 Bytes
Contents
require 'governor_livejournal/rails' require 'governor_livejournal/instance_methods' livejournal = Governor::Plugin.new('livejournal') livejournal.register_model_callback do |base| base.send :include, GovernorLivejournal::InstanceMethods base.after_save :post_to_livejournal_in_background, :unless => Proc.new { |article| article.changed.any?{|attribute| !%w(id title description post author_id author_type created_at updated_at).include? attribute } } base.after_destroy :remove_from_livejournal_in_background end Governor::PluginManager.register livejournal module GovernorLivejournal class Configuration cattr_accessor :username, :password end @@config = Configuration.new mattr_reader :config end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
governor_livejournal-0.1.0 | lib/governor_livejournal.rb |