paxful_engine-rails 0.7.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e1b07c79152a0e9d297bd7bd4e6895f3e594cd4b308028a4bc0a67ffe685075f
4
- data.tar.gz: 880e805c345090fccc40d0555f4b07254d8375977693ff2f1228ffe79795e190
3
+ metadata.gz: 35b73b52c9292bc8440a16c5782d38f4a54be438f351c2c843887709d1561f24
4
+ data.tar.gz: dda35af7b33c326dccc2c56debf738ed65042b5d27eb55d7081599fb65ed41eb
5
5
  SHA512:
6
- metadata.gz: 5a8cafa05d39f5b146b5220032498c67cda837844653a47f5c649eca38e0011b01a8098b822d62b02cda45fb8c517e06c01e54a17a3177b96de04e8063dfc383
7
- data.tar.gz: 1faf67ac478fc2b17a0b257be6486c3389749c867cc003de0ba37aff4abee9f08a4cc2dabb7fee60b9d48adce9336777b45c78391dae1cf41488fe08a468e56d
6
+ metadata.gz: d92645049bc6ec45b265d0e1575a959bf385dad892e3118bd2e46f38778a2df92d5843bc31847f3cb38d52949e1bb4722c03e06322f9501f978170ce515fd44a
7
+ data.tar.gz: 63213435b8c2ec813a332804845a939ed31d1fc30e4791b32eb38483a7aafe81a198e2e7ed2d59d39370e2755e06e37a29df5a6f8ea0558ae792f3a7c923ebbe
@@ -2,7 +2,11 @@ module PaxfulEngine
2
2
  class TradesController < ApplicationController
3
3
 
4
4
  def index
5
- @trades = Trade.order("completed_at DESC, created_at DESC")
5
+ @trades = Trade.order(completed_at: :desc, created_at: :desc)
6
+
7
+ if params[:q] != "all"
8
+ @trades = @trades.where.not(completed_at: :nil)
9
+ end
6
10
  end
7
11
 
8
12
  def show
@@ -1,4 +1,13 @@
1
- <span class="font-weight-bold"> Found <%= pluralize(@trades.count, "trade") %></span>
1
+ <span class="font-weight-bold"> Found <%= pluralize(@trades.count, "trade") %>.</span>
2
+
3
+ <div>
4
+ <% if params[:q] == "all" %>
5
+ <%= link_to "👀 Only show successful trades", trades_path %>
6
+ <% else %>
7
+ <%= link_to "👀 Include non-successful trades", trades_path(q: :all) %>
8
+ <% end %>
9
+ </div>
10
+
2
11
  <hr />
3
12
 
4
13
  <div class="table-responsive">
@@ -1,3 +1,3 @@
1
1
  module PaxfulEngine
2
- VERSION = '0.7.0'
2
+ VERSION = '0.8.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paxful_engine-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Chavez
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-11-05 00:00:00.000000000 Z
11
+ date: 2020-11-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gem_config