effective_classifieds 0.4.10 → 0.4.12

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d2931630940c37affb2cdd3ed51f2091685085bbb87d90c9a63d4e2055ebb246
4
- data.tar.gz: 6618d98e661fb555384c82808187c5caae82aa5e972a3b17c9841647dda559dc
3
+ metadata.gz: c3a688220a935a6980554c621e35be675cc20e766ed739757817462e782d542d
4
+ data.tar.gz: b1cf7e9621ff79365d006f27102045466ad086362a925f45ea9772ebe9699690
5
5
  SHA512:
6
- metadata.gz: 3b96e2f49826f5afd28a3522f2d1d5578014695212653c2661a08d87cc68c62306924835126cc06587280946a30c63ef56d2628e2ed319e8afd9660c834c3c7c
7
- data.tar.gz: e7b20879880ab6765a8062c7e7af2e72b282e83f18580de5e71383e492d85f721c122113910692be7cd1e969a7df05496717e9155a87f2c915aac8dca6f68f70
6
+ metadata.gz: ffbf9be19f33ccc8065cdbe50d0f3d06e85f545195501f623e3e90e44322f0901f989e0433654721a85ba0fe0104566cc4d6b04f8cfdbef38201d72424dd0e00
7
+ data.tar.gz: e71a5b0407e3a35599cbc42f618bf7111ae372139f7a942b349c2577b5120984b0b97c496e8e96e402bd5e21c19f0e77a75cf4c62f36a315d8faa15ff995166b
@@ -127,11 +127,11 @@ module Effective
127
127
  validates :phone, presence: true
128
128
  end
129
129
 
130
- validate(if: -> { start_on.present? && end_on.present? }) do
130
+ validate(if: -> { start_on.present? && end_on.present? && !importing }) do
131
131
  self.errors.add(:end_on, 'must be after start date') if end_on < start_on
132
132
  end
133
133
 
134
- validate(if: -> { start_on.present? && end_on.present? && EffectiveClassifieds.max_duration.present? }) do
134
+ validate(if: -> { start_on.present? && end_on.present? && EffectiveClassifieds.max_duration.present? && !importing }) do
135
135
  if (end_on - start_on) > EffectiveClassifieds.max_duration
136
136
  distance = ApplicationController.helpers.distance_of_time_in_words(end_on + EffectiveClassifieds.max_duration, end_on).gsub('about', '').strip
137
137
  self.errors.add(:end_on, "must be within #{distance} of start date")
@@ -0,0 +1,10 @@
1
+ en:
2
+ effective_classifieds:
3
+ name: 'Effective Classifieds'
4
+ acronym: 'Classifieds'
5
+
6
+ activerecord:
7
+ models:
8
+ # These ones might be app level
9
+ app/classified_wizard: 'Classified Wizard'
10
+ effective/classified: 'Classified'
@@ -1,3 +1,3 @@
1
1
  module EffectiveClassifieds
2
- VERSION = '0.4.10'.freeze
2
+ VERSION = '0.4.12'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_classifieds
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.10
4
+ version: 0.4.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-03-09 00:00:00.000000000 Z
11
+ date: 2023-04-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -234,6 +234,7 @@ files:
234
234
  - app/views/effective/classifieds/show.html.haml
235
235
  - app/views/effective/classifieds_mailer/classified_submitted.html.haml
236
236
  - config/effective_classifieds.rb
237
+ - config/locales/effective_classifieds.en.yml
237
238
  - config/routes.rb
238
239
  - db/migrate/01_create_effective_classifieds.rb.erb
239
240
  - db/seeds.rb