I am getting an error where it thinks my action is post id?
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 }
I would follow @macarthy ‘s advice and restart the server/check routes.
The error you’re getting show the nexttwentyfive route is not recognized as the collection and it’s being handled as /posts/:id