Sha256: 5926961a4f6d1b3b5fe43541a799175f4d23f55d08d6b72587af05f073df3990

Contents?: true

Size: 273 Bytes

Versions: 38

Compression:

Stored size: 273 Bytes

Contents

class UserActionObserver < ActiveRecord::Observer
  observe User, Page, Layout, Snippet
  
  cattr_accessor :current_user
  
  def before_create(model)
    model.created_by = @@current_user
  end
  
  def before_update(model)
    model.updated_by = @@current_user
  end
end

Version data entries

38 entries across 38 versions & 4 rubygems

Version Path
radiant-rails3-0.1 app/models/user_action_observer.rb
radiantcms-couchrest_model-0.2.4 app/models/user_action_observer.rb
radiantcms-couchrest_model-0.2.2 app/models/user_action_observer.rb
radiantcms-couchrest_model-0.2.1 app/models/user_action_observer.rb
radiantcms-couchrest_model-0.2 app/models/user_action_observer.rb
radiantcms-couchrest_model-0.1.9 app/models/user_action_observer.rb
radiantcms-couchrest_model-0.1.8 app/models/user_action_observer.rb
radiantcms-couchrest_model-0.1.7 app/models/user_action_observer.rb
radiantcms-couchrest_model-0.1.6 app/models/user_action_observer.rb
radiantcms-couchrest_model-0.1.5 app/models/user_action_observer.rb
radiantcms-couchrest_model-0.1.4 app/models/user_action_observer.rb
radiantcms-couchrest_model-0.1.3 app/models/user_action_observer.rb
radiantcms-couchrest_model-0.1.2 app/models/user_action_observer.rb
radiantcms-couchrest_model-0.1.1 app/models/user_action_observer.rb
radiantcms-couchrest_model-0.1 app/models/user_action_observer.rb
radiant-0.7.2 app/models/user_action_observer.rb
radiant-0.9.1 app/models/user_action_observer.rb
radiant-0.8.2 app/models/user_action_observer.rb
radiant-0.9.0.rc2 app/models/user_action_observer.rb
radiant-rc-0.9.0 app/models/user_action_observer.rb