Guest User

Untitled

a guest
Feb 20th, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. Comment#create
  2. def create(comment)
  3. @comment = Comment.new(comment)
  4. if @comment.save
  5. eager_cache([Posts, :show], :store => :action_store) { build_request(build_url(:post, @comment.post.to_param)) }
  6. partial 'comments/comment', :comment => @comment
  7. else
  8. return "Error saving comment"
  9. end
  10. end
  11.  
  12. merb : worker (port 4000) ~ Worker Thread Crashed with Exception:
  13. undefined method `build_url' for #<Comments:0xb71e2f00> - (NoMethodError)
  14. /home/justin/merb/blog/app/controllers/comments.rb:17:in `create'
Add Comment
Please, Sign In to add comment