I''m trying to show my blog to another logged in user, the blog is paginated and only present on one page (where everything else is presented about that specific user). My problem is that the paginate functio does not check for the next page of blog posts for that user, instead it links me back to my own blog-page (preentation index). There the paginate function works, for example it finds my own blogs on page 2. If I try to read my own blog in my public page (show) it links me back to my own page (index) again. The page 2 link shows "/presentation?page=2", which looks a bit odd, I thought it should look something like: "/presentation?login=d.stensson40%currant.se?page=2" since it''s a specific user with the address: "/presentation?login=d.stensson40%currant.se" . Clicking the link to page=2 I get re-routed to "/pres" (index page) I''m having a hard time wrapping this around my head, what am I doing so horribly wrong? ######################################################### Application controller ################################## ######################################################### def make_presentation_vars @pages, @posts = paginate(@blog.posts, :per_page => 2) end ######################################################### class PresentationController < ApplicationController #### ######################################################### def show @hide_edit_links = true login = params[:login] @user = User.find_by_login(login) @logged_in_user = User.find(session[:user]) if logged_in? if @user @blog = @user.blog ||= Blog.new #fulkod make_presentation_vars end end ######################################################### Presentation/show ####################################### (partial)_blog ########################################## ######################################################### <div id="blog"> <p> <% if paginated? %> <% first = @pages.current_page.first_item %> <% last = @pages.current_page.last_item %> <!--här är felet?--> <% if first == last %> Post <%= last %> of <% else %> Posts <%= first %>–<%= last %> of <% end %> <% end %> <%= pluralize(@blog.posts.count, "blog post") %> </p> <%= render :partial => "posts/post", :collection => @posts %> <%= "Pages: #{pagination_links(@pages)}" if paginated? %> </div> -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---