ActionView::TemplateError (undefined method `comment_count='

Hello,

I am using Facebooker RoR plug-in.

Following code used to work but suddenly I am getting an error which I
am not able to decipher. Any help is appreciated

Thanks
Rajan

ActionView::TemplateError (undefined method `comment_count=’ for
#<Facebooker::User::Status:0xb6c382bc @message={}, @time=“0”>) on line
#3 of meetings/list.fbml.erb:
1:


2:


3: Hi <%= @current_facebook_user.first_name %>, Welcome to trymeet.
4:


5:

6:

I had exactly the same problem. Infact, this occours from time to time
with various field-names.

Solution:
Open vendor/plugins/facebooker/lib/facebooker/models/user.rb and add the
“comment_count”-field to the attr_accessor-list (should be in line 12).
It should look like:

attr_accessor :message, :time, :status_id, :comment_count

Here is a link to a bug-report to a related problem some month ago (with
the same solution):
http://rubyforge.org/tracker/index.php?func=detail&aid=23004&group_id=4187&atid=16132

Have updated the User/Status class to include the extra filed as
described above but am still receiving an invlaid parameter error. Was
this definitly the solution to the problem…?

thanks,

Damo

Ma Mü wrote:

I had exactly the same problem. Infact, this occours from time to time
with various field-names.

Solution:
Open vendor/plugins/facebooker/lib/facebooker/models/user.rb and add the
“comment_count”-field to the attr_accessor-list (should be in line 12).
It should look like:

attr_accessor :message, :time, :status_id, :comment_count

Here is a link to a bug-report to a related problem some month ago (with
the same solution):
http://rubyforge.org/tracker/index.php?func=detail&aid=23004&group_id=4187&atid=16132

Are you sure you edited the correct line and restarted your app? Sorry I
know this is obvious, but I don’t what else could cause the problem.
After these changes it’s working like a charm for me.

require 'facebooker/model'
require 'facebooker/models/affiliation'
require 'facebooker/models/work_info'
require 'active_support'
module Facebooker
  #
  # Holds attributes and behavior for a Facebook User
  class User
    include Model
    class Status
      include Model
      attr_accessor :message, :time, :status_id, :comment_count # <-- 
EDIT HERE
    end
    FIELDS = ...

Restarting mongrel worked.

thanks for your help Ma Mu

best

Damo

Ma Mü wrote:

Are you sure you edited the correct line and restarted your app? Sorry I
know this is obvious, but I don’t what else could cause the problem.
After these changes it’s working like a charm for me.

require 'facebooker/model'
> require 'facebooker/models/affiliation'
> require 'facebooker/models/work_info'
> require 'active_support'
> module Facebooker
>   #
>   # Holds attributes and behavior for a Facebook User
>   class User
>     include Model
>     class Status
>       include Model
>       attr_accessor :message, :time, :status_id, :comment_count # <-- 
> EDIT HERE
>     end
>     FIELDS = ...

Ma Mü wrote:

I had exactly the same problem. Infact, this occours from time to time
with various field-names.

Solution:
Open vendor/plugins/facebooker/lib/facebooker/models/user.rb and add the
“comment_count”-field to the attr_accessor-list (should be in line 12).
It should look like:

attr_accessor :message, :time, :status_id, :comment_count

Here is a link to a bug-report to a related problem some month ago (with
the same solution):
http://rubyforge.org/tracker/index.php?func=detail&aid=23004&group_id=4187&atid=16132

Thanks a lot Ma Mu…I appreciate it. Your solution did work…
Please correct me here, This code just worked before day back and
started giving this trouble. Is it because Facebooker plug-in is
evolving…

Thanks for insight and quick response Have a good day.

Regards
Rajan B.