liks -> likes
This commit is contained in:
parent
c366eded75
commit
9bc071939f
|
@ -17,7 +17,7 @@ class LikesController < ApplicationController
|
||||||
|
|
||||||
def create
|
def create
|
||||||
post = Post.find( params[:blog_id] )
|
post = Post.find( params[:blog_id] )
|
||||||
like = post.liks.build
|
like = post.likes.build
|
||||||
|
|
||||||
if like.save
|
if like.save
|
||||||
render :json=> { success: true, id: like.id.to_s, count: post.liked_count }
|
render :json=> { success: true, id: like.id.to_s, count: post.liked_count }
|
||||||
|
|
Loading…
Reference in New Issue