From 7f5bdb0121dc9fc4e99e52e381901472ede7f13f Mon Sep 17 00:00:00 2001 From: albert Date: Sat, 23 Mar 2013 11:55:24 -0400 Subject: [PATCH] fixes #1049 --- app/models/user.rb | 2 +- app/views/users/edit.html.erb | 12 +----------- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/app/models/user.rb b/app/models/user.rb index d818c59d9..8547ae4af 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -25,7 +25,7 @@ class User < ActiveRecord::Base validates_uniqueness_of :email, :case_sensitive => false, :if => lambda {|rec| rec.email.present?} validates_length_of :password, :minimum => 5, :if => lambda {|rec| rec.new_record? || rec.password.present?} validates_inclusion_of :default_image_size, :in => %w(large original) - validates_inclusion_of :per_page, :in => [20, 50, 100] + validates_inclusion_of :per_page, :in => 1..100 validates_confirmation_of :password validates_presence_of :email, :if => lambda {|rec| rec.new_record? && Danbooru.config.enable_email_verification?} validates_presence_of :comment_threshold diff --git a/app/views/users/edit.html.erb b/app/views/users/edit.html.erb index dbadcd76d..4f605f7fd 100644 --- a/app/views/users/edit.html.erb +++ b/app/views/users/edit.html.erb @@ -17,17 +17,7 @@ <%= f.input :enable_post_navigation, :as => :select, :include_blank => false, :label => "Enable keyboard shortcuts" %> <%= f.input :new_post_navigation_layout, :as => :select, :label => "Pool links", :include_blank => false, :collection => [["Bottom", "true"], ["Top", "false"]], :hint => "When browsing pools, where do you want the navigation links to be placed?" %> <%= f.input :enable_sequential_post_navigation, :as => :select, :label => "Enable slideshow mode", :hint => "Show prev/next links when viewing a post", :include_blank => false %> - - <% if CurrentUser.is_privileged? %> - <%= f.input :per_page, :as => :select, :label => "Posts per page", :collection => [20, 50, 100], :include_blank => false %> - <% end %> - -
- - - A list of whitespace delimited tags that show up in your profile. <%= link_to "Restore from old database", restore_uploaded_tags_user_path(@user), :method => :post, :remote => true %> -
- + <%= f.input :per_page, :label => "Posts per page", :as => :select, :collection => (1..100), :include_blank => false %> <%= f.input :blacklisted_tags, :hint => "Put any tag combinations you never want to see here. Each combination should go on a separate line.", :input_html => {:size => "40x5"} %>