Commit d0e93a31b0df641b88dface07e5e122c2f6af3b9
1 parent
d08608af
Exists in
master
and in
28 other branches
Validate products per page
(ActionItem3105)
Showing
1 changed file
with
3 additions
and
0 deletions
Show diff stats
app/models/enterprise.rb
... | ... | @@ -23,7 +23,10 @@ class Enterprise < Organization |
23 | 23 | N_('Organization website'); N_('Historic and current context'); N_('Activities short description'); N_('City'); N_('State'); N_('Country'); N_('ZIP code') |
24 | 24 | |
25 | 25 | settings_items :organization_website, :historic_and_current_context, :activities_short_description, :zip_code, :city, :state, :country |
26 | + | |
26 | 27 | settings_items :products_per_catalog_page, :type => :integer, :default => 6 |
28 | + alias_method :products_per_catalog_page_before_type_cast, :products_per_catalog_page | |
29 | + validates_numericality_of :products_per_catalog_page, :allow_nil => true, :greater_than => 0 | |
27 | 30 | |
28 | 31 | extend SetProfileRegionFromCityState::ClassMethods |
29 | 32 | set_profile_region_from_city_state | ... | ... |