changes
This commit is contained in:
@@ -21,10 +21,7 @@ class CommentsController < ApplicationController
|
||||
end
|
||||
|
||||
def create
|
||||
@comment = Comment.new(params[:comment])
|
||||
@comment.post_id = params[:comment][:post_id]
|
||||
@comment.score = 0
|
||||
@comment.save
|
||||
@comment = Comment.create(params[:comment])
|
||||
respond_with(@comment) do |format|
|
||||
format.html do
|
||||
redirect_to post_path(@comment.post), :notice => "Comment posted"
|
||||
|
||||
@@ -15,7 +15,7 @@ class PoolsController < ApplicationController
|
||||
|
||||
def index
|
||||
@search = Pool.search(params[:search])
|
||||
@pools = @search.paginate(:page => params[:page])
|
||||
@pools = @search.paginate(params[:page])
|
||||
respond_with(@pools)
|
||||
end
|
||||
|
||||
@@ -25,9 +25,7 @@ class PoolsController < ApplicationController
|
||||
|
||||
def show
|
||||
@pool = Pool.find(params[:id])
|
||||
@post_set = PostSets::Base.new(:id => @pool, :page => params[:page])
|
||||
@post_set.extend(PostSets::Numbered)
|
||||
@post_set.extend(PostSets::Pool)
|
||||
@post_set = PostSets::Pool.new(@pool, params[:page])
|
||||
respond_with(@pool)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user