2011-03-04 2 views
0

내 작업이 게시물 ID라고 생각하는 곳에서 오류가 발생합니까?ROR 새로운 작업 오류 ID = nexttwentyfive의 게시물을 찾을 수 없습니다.

URL http://localhost:3000/posts/nexttwentyfive?lastid=1

def nexttwentyfive 
    @posts = Post.find(:all, :order => "date", :limit => 25, :conditions => ["id=? AND created_at > ?", Time.now, params[:lastid]]) 

    respond_to do |format| 
    format.html 
    format.xml { render :xml => @post } 
    format.json { render :json => @post } 
end 
end 

map.resources :posts, :collection => { :nexttwentyfive => :get } 
+1

당신이 당신의 서버를 다시 시작 했 ID? '레이크 루트 | grep "next"'출력? – macarthy

+0

@nathanvda'map.resources'는 Rails2 라우팅 구문입니다. –

답변

0

내가 조언을 @macarthy의 따라 서버/체크 경로를 다시 시작합니다.

당신이 nexttwentyfive 경로를 보여지고있어 오류가 컬렉션으로 인식되지 않고는/글 /로 처리되는 것 :

관련 문제