[Facebooker-talk] hashed_content method problem in short and full stories
Jesse Ikonen
jesse.ikonen at kaseygroup.com
Thu Jan 22 16:02:59 EST 2009
Hello,
afaik I'm having issue with publisher.rb method called hashed_content.
This is my UserPublisher template stuff:
def question_template
one_line_story_template "{*actor*} asked a question in
{*app_link*}"
full_story_template "{*actor*} asked '{*body*}' in
{*app_link*}.", "Voting expires {*date*}."
end
Following happens:
>> UserPublisher.register_question
NoMethodError: undefined method `<=>' for :template_title:Symbol
from ...vendor/plugins/facebooker/lib/facebooker/rails/publisher.rb:
180:in `sort_by'
from ...vendor/plugins/facebooker/lib/facebooker/rails/publisher.rb:
180:in `hashed_content'
from ...vendor/plugins/facebooker/lib/facebooker/rails/publisher.rb:
131:in `register'
from ...vendor/plugins/facebooker/lib/facebooker/rails/publisher.rb:
451:in `method_missing'
from (irb):1
If I have short_story_template it will break on line number 179.
I think this has something to do with this commit @ github:
- Digest::MD5.hexdigest
[publisher.one_line_story_templates, publisher.short_story_templates,
publisher.full_story_template].to_json
+ # sort the Hash elements (in the short_story and
full_story) before generating MD5
+ Digest::MD5.hexdigest [publisher.one_line_story_templates,
+ (publisher.short_story_templates and
publisher.short_story_templates.collect{|ss| ss.to_a.sort_by{|e|
e[0]}}),
+ (publisher.full_story_template and
publisher.full_story_template.to_a.sort_by{|e| e[0]})
+ ].to_json
Has anyone experienced same or any clue of what I'm doing wrong?
Thanks!
More information about the Facebooker-talk
mailing list