Hello All,,
I have problem in my controller page. Btw i want to execute localhost:3000/article/donat?author_id=4, this mean i want to get on view only article with author_id = 4 i have tried type code like this.
def donat
@title = "All blog entries"
if params[:author_id] == :author_id
@articles = Article.published.find_by_params(author_id)
else
@articles = Article.published
end
@articles = @articles.paginate :page => params[:page], :per_page => 20
render :template => 'home/index'
end
It is not working. Have you any suggestion for this case?