Skip to content

Instantly share code, notes, and snippets.

@mynyml
Created August 18, 2008 00:27
Show Gist options
  • Save mynyml/5871 to your computer and use it in GitHub Desktop.
Save mynyml/5871 to your computer and use it in GitHub Desktop.
# in lib/patches/facebooker.rb
module Facebooker
module Rails
module Helpers
def fb_wallpost(user,message,time)
content_tag("fb:wallpost",message,:uid=>cast_to_facebook_id(user),:t=>time.to_i)
end
end
end
end
# outputs the error:
ActionView::TemplateError (undefined method `fb_wall' for #<ActionView::Base:0xb6100188>) on line #62 of ~/dev/projects/www//app/views//show.fbml.erb:
<% fb_wall do -%>
<% for comment in @comments -%>
<%= fb_wallpost(comment.author, comment.body, comment.created_at) %>
<% end -%>
<% end -%>
# if i comment out the patch code above (and revert the api call to fit the original one), i get no error.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment