robert bradford
2006-Jul-12 21:52 UTC
[Rails] Problem w/ Rails 1.1.4 and pagination_links using params?
I just installed version 1.1.4 and it seems like I started having problems with the pagination_links method. When I call the method using something like this (using the :params option--and this seems to be the problem), <%= pagination_links @todo_pages, :params => params %> then it duplicates part of the controller in the generated url. For example, before one of my paginator links would generate this: http://localhost:3000/it/todos/list?page=2&complete=all Now it is doing this: http://localhost:3000/it/it/todos/list?page=2&complete=all In a different part of my application I had the following: Before: http://localhost:3000/it/assets/assignments/search_equipment?page=2 After: http://localhost:3000/it/assets/it/assets/assignments/search_equipment?page=2 I have done some grouping of controllers into modules, and it appears replicate everything but the final controller name. For example, with the It::Assets::Assignments controller, only "it/assets" is duplicated. I just noticed it today after I had upgraded. Can anyone else replicate this problem? Any ideas? Thanks, Robert -- Posted via http://www.ruby-forum.com/.
robert bradford
2006-Jul-12 22:01 UTC
[Rails] Re: Problem w/ Rails 1.1.4 and pagination_links using params
> I just installed version 1.1.4 and it seems like I started having > problems with the pagination_links method. When I call the method using > something like this (using the :params option--and this seems to be the > problem), > > <%= pagination_links @todo_pages, :params => params %>It''s me again. I forgot to say that if I explicitly state which params to include then it doesn''t mess up. There is only a problem when I use ":params => params" This still works fine: <%= pagination_links @todo_pages, :params => {:complete => params[:complete] %> Something with having the :controller in the params??? -- Posted via http://www.ruby-forum.com/.