added pagination to photo picker on the user profile. still ugly, less sucky
This commit is contained in:
parent
0c2fc54c0f
commit
d7550568ad
3 changed files with 3 additions and 2 deletions
|
|
@ -12,7 +12,7 @@ class UsersController < ApplicationController
|
||||||
def edit
|
def edit
|
||||||
@user = User.first(:id => params[:id])
|
@user = User.first(:id => params[:id])
|
||||||
@profile = @user.profile
|
@profile = @user.profile
|
||||||
@photos = Photo.all
|
@photos = Photo.paginate :page => params[:page], :order => 'created_at DESC'
|
||||||
end
|
end
|
||||||
|
|
||||||
def update
|
def update
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@
|
||||||
%div.small_photo{:id => photo.image.thumb_medium.url}
|
%div.small_photo{:id => photo.image.thumb_medium.url}
|
||||||
= check_box_tag 'checked_photo'
|
= check_box_tag 'checked_photo'
|
||||||
= link_to image_tag(photo.image.url(:thumb_medium)), "#"
|
= link_to image_tag(photo.image.url(:thumb_medium)), "#"
|
||||||
|
=will_paginate @photos
|
||||||
|
|
||||||
|
|
||||||
%h3 Info
|
%h3 Info
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue