solid_litequeen 0.6.1 → 0.6.2

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: b1e70145a172d627ebc83e61e3d2dff09d994487fc2dd3116687145bb7e36ce5
4
- data.tar.gz: 06d5e0219a79a1ff5d0f7dbb290e477689160bcfad947dadd3e9bada60f2b986
3
+ metadata.gz: c92b8fcf6df429103f53b5fd900f41ff721da4819cf2e8e83cd644988692f76f
4
+ data.tar.gz: e4dafbfd83bb9d5c17a6f9498caad74ec0118ba777a85a2f532c7c35f96fc51d
5
5
  SHA512:
6
- metadata.gz: aaef9b56b95cf4b550fcb77bae49bbe4275992e4670019f8310db8a47ab3a473b8736dee5a29c0c29772e21ea660550489d1461ec5433f9f41475aa463b05131
7
- data.tar.gz: 2e256d20ba97eebaae057f8ac06eb1a16d996fce3dd71d2e4ad7aed85f30bc6f6b8333e7ec21c81d5c482d7ca5e7b28eeae68188b9a852f5cb15d5e801f9db58
6
+ metadata.gz: 55efb96c239ee49172e7eed7fc03fbdd1f7869cf47d086d63fbb8016df8d77aceb7589603437a5cf64071f48a15cd30b1b54012c478d54b8f3a1e714b65442c3
7
+ data.tar.gz: 3e9adffecd3c631995842f680ca5b29976d32ce6b5d334bd9c0373589473273d27f3acc78657dbabfaf84b742cae871495a3ec4520b95a02c81c49e819a31bec
@@ -40,10 +40,11 @@ module SolidLitequeen
40
40
  )
41
41
 
42
42
  @data = DynamicDatabase.connection.select_all("SELECT * FROM #{@table_name} LIMIT 50")
43
+ @row_count = row_count = DynamicDatabase.connection.select_value("SELECT COUNT(*) FROM #{@table_name}").to_i
43
44
  end
44
45
 
45
46
  def download
46
- database_id = params.expect(:id)
47
+ database_id = params.expect(:database_id)
47
48
  database_location = Base64.urlsafe_decode64(database_id)
48
49
 
49
50
  # Verify the file exists
@@ -12,7 +12,7 @@
12
12
  </h1>
13
13
 
14
14
  <div class="mb-6">
15
- <p class="text-gray-600"><%= pluralize(@data.rows.count, "row") %> found</p>
15
+ <p class="text-gray-600"><%= pluralize(@row_count, "row") %> found</p>
16
16
  </div>
17
17
 
18
18
  <div class="bg-white rounded-lg shadow overflow-x-auto">
data/config/routes.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  SolidLitequeen::Engine.routes.draw do
2
2
  resources :databases, only: [ :index, :show ] do
3
3
  get "/tables/:table", to: "databases#table_rows", as: :table_rows
4
- get "databases/:id/download", to: "databases#download", as: "download"
4
+ get "download", to: "databases#download", as: "download"
5
5
  end
6
6
  root to: "databases#index"
7
7
  end
@@ -1,3 +1,3 @@
1
1
  module SolidLitequeen
2
- VERSION = "0.6.1"
2
+ VERSION = "0.6.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solid_litequeen
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vik Borges
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-03-04 00:00:00.000000000 Z
11
+ date: 2025-03-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails