users: raise max posts per page to 200.
This commit is contained in:
@@ -73,7 +73,7 @@ class User < ApplicationRecord
|
||||
validates_uniqueness_of :email, :case_sensitive => false, :if => ->(rec) { rec.email.present? && rec.saved_change_to_email? }
|
||||
validates_length_of :password, :minimum => 5, :if => ->(rec) { rec.new_record? || rec.password.present?}
|
||||
validates_inclusion_of :default_image_size, :in => %w(large original)
|
||||
validates_inclusion_of :per_page, :in => 1..100
|
||||
validates_inclusion_of :per_page, in: (1..PostSets::Post::MAX_PER_PAGE)
|
||||
validates_confirmation_of :password
|
||||
validates_presence_of :comment_threshold
|
||||
validate :validate_ip_addr_is_not_banned, :on => :create
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
<%= f.input :default_image_size, :hint => "Show original image or show resized #{Danbooru.config.large_image_width} pixel version", :label => "Default image width", :collection => [["850px", "large"], ["original", "original"]], :include_blank => false %>
|
||||
|
||||
<% if CurrentUser.user.is_gold? %>
|
||||
<%= f.input :per_page, :label => "Posts per page", :as => :select, :hint => "Number of thumbnails per page", :collection => (1..200), :include_blank => false %>
|
||||
<%= f.input :per_page, :label => "Posts per page", :as => :select, :hint => "Number of thumbnails per page", :collection => (1..PostSets::Post::MAX_PER_PAGE), :include_blank => false %>
|
||||
<% end %>
|
||||
|
||||
<%= f.input :enable_safe_mode, :label => "Safe mode", :hint => "Show only safe images. Hide questionable and explicit images.", :as => :select, :include_blank => false, :collection => [["Yes", "true"], ["No", "false"]] %>
|
||||
|
||||
Reference in New Issue
Block a user