lib/intercom/user.rb in intercom-0.2.3 vs lib/intercom/user.rb in intercom-0.3.0

- old
+ new

@@ -335,16 +335,16 @@ raise ArgumentError.new("Companies requires an array of hashes of companies") unless companies.is_a?(Array) && companies.all? {|company| company.is_a?(Hash)} @attributes["companies"] = companies.collect {|company| FlatStore.new(company) } end ## - # Creates a UserEvent for the given User + # Creates an Event for the given User # @param {Hash} options, keys for :created_at (Unix timestamp) and metadata - def log_event(event_name, options={}) + def track_event(event_name, options={}) attributes = {:event_name => event_name, :user => self} attributes[:created_at] = options[:created_at] unless options[:created_at].nil? attributes[:metadata] = options[:metadata] unless options[:metadata].nil? - UserEvent.create(attributes) + Event.create(attributes) end protected def social_profiles=(social_profiles) #:nodoc: @social_profiles = social_profiles.map { |account| SocialProfile.new(account) }.freeze