Skip to content

Instantly share code, notes, and snippets.

@nitsujw
Created November 11, 2008 04:44
Show Gist options
  • Save nitsujw/23739 to your computer and use it in GitHub Desktop.
Save nitsujw/23739 to your computer and use it in GitHub Desktop.
Comment#create
def create(comment)
@comment = Comment.new(comment)
if @comment.save
eager_cache([Posts, :show], :store => :action_store) { build_request(build_url(:post, Post.get(@comment.post_id).to_param)) }
partial 'comments/comment', :comment => @comment
else
return "Error saving comment"
end
end
merb : worker (port 4000) ~ Worker Thread Crashed with Exception:
undefined method `build_url' for #<Comments:0xb71e2f00> - (NoMethodError)
/home/justin/merb/entitea_caching/app/controllers/comments.rb:17:in `create'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment