I am trying to track down where the pagination_links are calculated.
I have integrated SB into my site, and the show.rhtml for the topics
controller references them like this:
The problem is, the pagination_links are being built wrong. They are
missing the forums id in the url and are defaulting to: ../topics/9?
page=2 notice there is not a "forums" part to that URL. The URL
should be .../forums/6/topics/9?page=2.
Right now, this produced a Action Controller exception: Couldn't find
Forum without an ID.
It all makes sense ... now I just need to find where I can change how
"pagination_links" are built.
This must be a standard problem .... unless I've mucked up my
environment too much without realizing it??
Ahhhhh ... that's why I couldn't find pagination_links in any of my SB
helper files. I added your puedo code to my topic controller and it
worked great!!! For others ... very specifically:
def find_forum_and_topic
if params[:id] && !params[:forum_id]
@topic = Topic.find(params[:id])
@forum = @topic.forum_id
else
@forum = Forum.find(params[:forum_id])
@topic = @forum.topics.find(params[:id]) if params[:id]
end
end