Skip to content
Browse files

same tweaks

  • Loading branch information...
1 parent a1b994e commit 1d4c88e41e3aae5840431323605fc95f98dc9e35 @mcansky committed May 18, 2011
Showing with 10 additions and 2 deletions.
  1. +10 −2 app/controllers/posts_controller.rb
View
12 app/controllers/posts_controller.rb
@@ -55,9 +55,17 @@ def index
end
else
if user
- posts = user.bookmarks.find(:all, :offset => (params[:start] || 0), :limit => (params[:results] || limit), :conditions => conditions, :order => "bookmarked_at DESC")
+ if !params[:result]
+ posts = user.bookmarks.find(:all, :offset => (params[:start] || 0), :conditions => conditions, :order => "bookmarked_at DESC")
+ else
+ posts = user.bookmarks.find(:all, :offset => (params[:start] || 0), :limit => (params[:results] || limit), :conditions => conditions, :order => "bookmarked_at DESC")
+ end
else
- posts = Bookmark.find(:all, :offset => (params[:start] || 0), :limit => (params[:results] || limit), :conditions => conditions, :order => "bookmarked_at DESC")
+ if !params[:result]
+ posts = Bookmark.find(:all, :offset => (params[:start] || 0), :conditions => conditions, :order => "bookmarked_at DESC")
+ else
+ posts = Bookmark.find(:all, :offset => (params[:start] || 0), :limit => (params[:results] || limit), :conditions => conditions, :order => "bookmarked_at DESC")
+ end
end
end
# filter private ones

0 comments on commit 1d4c88e

Please sign in to comment.
Something went wrong with that request. Please try again.