effective_classifieds 0.4.5 → 0.4.7

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: f08a97cd9079f6baa93e5fc992db40dbeb951cbfe067614a06996770ef83d49c
4
- data.tar.gz: 1ec2f2ca6b22fa02e6bf2ab43f008a886cd414f5b146a299278b04b57f6220b0
3
+ metadata.gz: 4efe669bad28e0c18b965b784e4b307a12e933d2d110deb660f73aae68f7dab0
4
+ data.tar.gz: daea6b6ae0e2285fde3b87fd1f723a03537465dcda8bed6c4fb2d018d50b2144
5
5
  SHA512:
6
- metadata.gz: 211355aecad1c8ce668aa4caed147d0304f695baeb531dc3951046bdf82c7027349671ff8032f364366e6a067506d82c86c24da7209a3d43a03d4726cb8c29b1
7
- data.tar.gz: 8dd8f720c87fd1d5b17c56f700bb38c18bb0552bba6cf30195c6a5881f499e03b95a379b92a2d95e9fcee1da529919d48690fc0f68d1d7a62ef2bfad42358e40
6
+ metadata.gz: 283e5708a1d92871e614b95eebaf25511de9b656f2e92716824620ebc92541416bc08fd43f5b1014e74f08df96b5d3c9eb05eb9b271264ae84f53352a88846c0
7
+ data.tar.gz: 606cad7e6b2294a8878618a6a35b31266a089cd2d68fe537e29d71152680c99ad184988e3aa50eda29660bd06d1e6b0379de5f322f695d5159f3585128a35b2a
@@ -2,7 +2,7 @@
2
2
  class EffectiveClassifiedsDatatable < Effective::Datatable
3
3
  datatable do
4
4
  length :all
5
- order :start_on
5
+ order :end_on
6
6
 
7
7
  col :start_on, as: :date, label: 'Published'
8
8
  col :end_on, as: :date, label: 'Closing'
@@ -63,7 +63,7 @@ module Effective
63
63
  timestamps
64
64
  end
65
65
 
66
- scope :sorted, -> { order(:id) }
66
+ scope :sorted, -> { order(end_on: :desc) }
67
67
  scope :deep, -> { with_rich_text_body }
68
68
 
69
69
  scope :upcoming, -> { where(arel_table[:end_on].gt(Time.zone.now)) }
@@ -87,7 +87,7 @@ module Effective
87
87
  }
88
88
 
89
89
  scope :classifieds, -> (user: nil, unpublished: false) {
90
- scope = all.deep.sorted
90
+ scope = all.deep
91
91
 
92
92
  if defined?(EffectiveRoles) && EffectiveClassifieds.use_effective_roles
93
93
  scope = scope.for_role(user&.roles)
@@ -1,3 +1,3 @@
1
1
  module EffectiveClassifieds
2
- VERSION = '0.4.5'.freeze
2
+ VERSION = '0.4.7'.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.5
4
+ version: 0.4.7
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: 2022-11-09 00:00:00.000000000 Z
11
+ date: 2022-11-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails