lib/stream/fires.rb in Stream-0.1.0 vs lib/stream/fires.rb in Stream-0.1.1
- old
+ new
@@ -16,11 +16,11 @@
opts[:subject] = :self unless opts.has_key?(:subject)
method_name = :"fire_#{activity_type}_after_#{opts[:on]}"
define_method(method_name) do
- create_options = [:recipient, :actor, :subject, :secondary_subject].inject({}) do |memo, sym|
+ create_options = [:actor, :subject, :secondary_subject].inject({}) do |memo, sym|
if opts[sym]
if opts[sym].respond_to?(:call)
memo[sym] = opts[sym].call(self)
elsif opts[sym] == :self
memo[sym] = self
@@ -30,10 +30,10 @@
end
memo
end
create_options[:activity_type] = activity_type.to_s
- Activity.create!(create_options)
+ ActivityItem.create!(create_options)
end
send(:"after_#{opts[:on]}", method_name, :if => opts[:if])
end
end