Created
November 10, 2008 22:54
-
-
Save nitsujw/23676 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def create(comment) | |
@comment = Comment.new(comment) | |
if @comment.save | |
@post = Comment.get(comment[:post_id]) | |
#eager_cache(:create, [Posts, :show], :store => :action_store) { build_request(build_url(:post, @post)) } | |
eager_cache([Posts, :show], :store => :action_store) { build_request(build_url(:post, @post)) } | |
partial "comments/comment", :comment => @comment | |
else | |
return "There was an error adding your comment" | |
end | |
end | |
merb : worker (port 4000) ~ Worker Thread Crashed with Exception: | |
undefined method `build_url' for #<Comments:0xb74077b8> - (NoMethodError) | |
/home/justin/merb/entitea_blog/app/controllers/comments.rb:32:in `create' | |
Or trying to update Post#show from Post#update | |
def update(id) | |
@post = Post.get(id) | |
@post.description = Whistler.white_list(post[:value]) | |
if @post.save | |
eager_cache(:show, :store => :action_store) { build_request(build_url(:post, @post.to_param)) } | |
redirect url(:post, @post.to_param) | |
end | |
end | |
merb : worker (port 4000) ~ Worker Thread Crashed with Exception: | |
undefined method `build_url' for #<Posts:0xb71bac44> - (NoMethodError) | |
/home/justin/merb/entitea_blog/app/controllers/posts.rb:159:in `update' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment