Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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'
Add Comment
Please, Sign In to add comment