From 9bc071939f98c228adeb208a0b301b8cf5d14500 Mon Sep 17 00:00:00 2001 From: yafeilee Date: Wed, 4 Jun 2014 10:31:43 +0800 Subject: [PATCH] liks -> likes --- app/controllers/likes_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/likes_controller.rb b/app/controllers/likes_controller.rb index 4ca3fb7..4e6e9e3 100644 --- a/app/controllers/likes_controller.rb +++ b/app/controllers/likes_controller.rb @@ -17,7 +17,7 @@ class LikesController < ApplicationController def create post = Post.find( params[:blog_id] ) - like = post.liks.build + like = post.likes.build if like.save render :json=> { success: true, id: like.id.to_s, count: post.liked_count }