diff --git a/lib/timeline_fu/fires.rb b/lib/timeline_fu/fires.rb index 2bf71c3..208a10d 100644 --- a/lib/timeline_fu/fires.rb +++ b/lib/timeline_fu/fires.rb @@ -31,12 +31,16 @@ def fires(event_type, opts) memo end create_options[:event_type] = event_type.to_s - - TimelineEvent.create!(create_options) + if create_options[:actor].kind_of?(Array) + create_options[:actor].each { |actor| TimelineEvent.create!(create_options.merge({:actor => actor})) } + else + TimelineEvent.create!(create_options) + end + end send(:"after_#{opts[:on]}", method_name, :if => opts[:if]) end end end -end +end \ No newline at end of file