Sha256: 20fc0f1d0398df78ca05c887b359c07e24283eeb0cfc588e2f3f021dcfc5f562

Contents?: true

Size: 481 Bytes

Versions: 15

Compression:

Stored size: 481 Bytes

Contents

class Event < ActiveRecord::Base
  
  belongs_to :user
  
  def self.store(name, request, user_id = nil, notes = nil, reference = nil)
    
    e = Event.new(:name=>name, :url=>request ? request.fullpath : "n/a", :ip_address=>request ? request.remote_ip : "n/a", :user_id=>user_id, :notes=>notes, :reference=>reference)
    e.save
   
    if name != "404 error"
      logger.debug "Sending?"
      Notifications.event(e).deliver rescue nil
    end
        
    return e
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
kit_cms-2.3.22 app/models/event.rb
kit_cms-2.3.20 app/models/event.rb
kit_cms-2.3.19 app/models/event.rb
kit_cms-2.3.18 app/models/event.rb
kit_cms-2.3.17 app/models/event.rb
kit_cms-2.3.16 app/models/event.rb
kit_cms-2.3.15 app/models/event.rb
kit_cms-2.3.14 app/models/event.rb
kit_cms-2.3.13 app/models/event.rb
kit_cms-2.3.11 app/models/event.rb
kit_cms-2.3.10 app/models/event.rb
kit_cms-2.3.9 app/models/event.rb
kit_cms-2.3.8 app/models/event.rb
kit_cms-2.3.7 app/models/event.rb
kit_cms-2.3.6 app/models/event.rb