parolkar's pfeed plugin
I have used parolker's pfeed
plugin to log users activities but I am getting error while saving the feed. Below is the error message displayed.
TypeError (wrong argument type nil (expected Data)): /Users/me/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/syck.rb:401:in `emit' /Users/me/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/syck.rb:401:in `quick_emit' /Users/me/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/syck/rubytypes.rb:40:in `to_yaml' vendor/plugins/pfeed/app/models/pfeed_item.rb:37:in `log' (eval):7:in `start_followup_with_pfeed' app/controllers/individuals_controller.rb:329:in `add_followup' /Users/me/.rvm/gems/ruby-1.9.2-p180@suga/gems/hoptoad_notifier-2.4.9/lib/hoptoad_notifier/rack.rb:27:in `call' /Users/me/.rvm/gems/ruby-1.9.2-p180@suga/gems/hoptoad_notifier-2.4.9/lib/hoptoad_notifier/user_informer.rb:12:in `call' :10:in `synchronize' /Users/me/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service' /Users/me/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run' /Users/me/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'
The error message points line 37
of pfeed_item.rb
which is p_item.save!
I tried p_item.errors
but it returns empty message.
Do you guys have any idea?
Thanks in advance :)
PS: Rails 2.3.5
and Ruby 1.9.2-p180
=========
Model: individual.rb def start_followup(ind_followup) puts "added follow-up" end def complete_followup(ind_followup) puts "completed follow-up" end emits_pfeeds :on => [:start_followup,:complete_followup] , :for => [:itself] # Note: if feed needs to be received by all users , you could use :for => [:all_in_its_class] receives_pfeed
The model method is called from controller as
@individual.start_followup(@followup)
Beside this everything is done in pfeeds.
链接地址: http://www.djcxy.com/p/41914.html下一篇: parolkar的pfeed插件