Closed MrDys closed 12 years ago
Original reporter: jrochkind
jrochkind: Thanks cbeer for telling me what to fix, I just fixed it. Change one line in blacklight/config/routes.rb.
https://github.com/projectblacklight/blacklight/commit/8ce0a9f1eb0d9fc8c0734a2980effff56383817d
cbeer: It looks like saved searches are not routed as resources -- dfunk, any reason why?
jrochkind: Probably should add a routing spec for it when we fix it too.
On 4/28/2011 3:31 PM, Chris Beer (JIRA) wrote:
[ http://jira.projectblacklight.org/jira/browse/CODEBASE-315?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=11713#action_11713 ]
Chris Beer commented on CODEBASE-315:
It looks like saved searches are not routed as resources -- dfunk, any reason why?
weird routing issue with saved_searches
Key: CODEBASE-315 URL: http://jira.projectblacklight.org/jira/browse/CODEBASE-315 Project: Blacklight Plugin Issue Type: Bug Reporter: Jonathan Rochkind Assignee: Dan Funk Fix For: 3.0
In rails3 branch, the link to saved searches is generated as "/saved_searches/index", instead of just "/saved_searches". And indeed, on the other end, trying to access "/saved_searches" gets you an 'unroutable' error. What's going on there? Normally Rails routing allows the default 'index' action to be left off, and generates URLs accordingly. Oddly, the analagous actions /folder and /bookmarks do NOT exhibit this problem, so comparing/contrasting routing for those might be where to start. We want that behavior back, just for cleaner nicer URLs, and also because we support bookmarkable URLs, and some users may have bookmarked that in bl2 and we don't want to break it. Also, who knows if it indicates some underlying problem of some kind.
CODEBASE-315: In rails3 branch, the link to saved searches is generated as "/saved_searches/index", instead of just "/saved_searches". And indeed, on the other end, trying to access "/saved_searches" gets you an 'unroutable' error.
What's going on there? Normally Rails routing allows the default 'index' action to be left off, and generates URLs accordingly. Oddly, the analagous actions /folder and /bookmarks do NOT exhibit this problem, so comparing/contrasting routing for those might be where to start.
We want that behavior back, just for cleaner nicer URLs, and also because we support bookmarkable URLs, and some users may have bookmarked that in bl2 and we don't want to break it. Also, who knows if it indicates some underlying problem of some kind.