brick 1.0.148 → 1.0.149
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 91e6b3d87c423a90e6e6cf62a07235e185373d9bb60990579a13ccea83c6a645
|
4
|
+
data.tar.gz: 8670e080c676eb7c5be3bb62b7ce4e7a310e8d30c98c3d189d513bd9e06a2af3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 58ff4070f313c577b027f2c83babb99c2aeecaf0cfd05edbed89ed6e5a32485a9bdc8849e303d9eb16fa6f5824beb66e4dbf282843bc4e2b1a00c7ec13e0616a
|
7
|
+
data.tar.gz: 20cd0a6b43f267a653923a86ded57b041cbe49adbd1e239236faac18415eab0e8515490e0828dcc67f4d7e4f809efae9ff7249a1ab5d9a9626a8a24dced8d2d9
|
data/lib/brick/extensions.rb
CHANGED
@@ -95,7 +95,7 @@ module ActiveRecord
|
|
95
95
|
return @_brick_primary_key if instance_variable_defined?(:@_brick_primary_key)
|
96
96
|
|
97
97
|
pk = begin
|
98
|
-
primary_key.is_a?(String) ? [primary_key] : primary_key || []
|
98
|
+
primary_key.is_a?(String) ? [primary_key] : primary_key.dup || []
|
99
99
|
rescue
|
100
100
|
[]
|
101
101
|
end
|
@@ -907,7 +907,7 @@ JOIN (SELECT #{hm_selects.map { |s| _br_quoted_name("#{'br_t0.' if from_clause}#
|
|
907
907
|
s << v
|
908
908
|
end
|
909
909
|
else # String stuff (which defines a custom ORDER BY) just comes straight through
|
910
|
-
v = v.split('.').map { |x| _br_quoted_name(x) }.join('.')
|
910
|
+
# v = v.split('.').map { |x| _br_quoted_name(x) }.join('.')
|
911
911
|
s << v
|
912
912
|
# Avoid "PG::InvalidColumnReference: ERROR: for SELECT DISTINCT, ORDER BY expressions must appear in select list" in Postgres
|
913
913
|
selects << v if is_distinct
|
@@ -1695,7 +1695,7 @@ class Object
|
|
1695
1695
|
when Symbol
|
1696
1696
|
order_tbl[order_default] || order_default
|
1697
1697
|
else
|
1698
|
-
pk.map { |part| "#{table_name}.#{part}"}
|
1698
|
+
pk.map { |part| "#{table_name}.#{part}"} # If it's not a custom ORDER BY, just use the key
|
1699
1699
|
end
|
1700
1700
|
end
|
1701
1701
|
|
@@ -46,12 +46,12 @@ module Brick
|
|
46
46
|
end
|
47
47
|
end
|
48
48
|
unless val_err || val.nil?
|
49
|
-
if (geometry = RGeo::WKRep::WKBParser.new.parse(val.pack('c*'))).is_a?(RGeo::Cartesian::PointImpl)
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
49
|
+
val = if ((geometry = RGeo::WKRep::WKBParser.new.parse(val.pack('c*'))).is_a?(RGeo::Cartesian::PointImpl) ||
|
50
|
+
geometry.is_a?(RGeo::Geos::CAPIPointImpl)) &&
|
51
|
+
!(geometry.y == 0.0 && geometry.x == 0.0)
|
52
|
+
# Create a POINT link to this style of Google maps URL: https://www.google.com/maps/place/38.7071296+-121.2810649/@38.7071296,-121.2810649,12z
|
53
|
+
"<a href=\"https://www.google.com/maps/place/#{geometry.y}+#{geometry.x}/@#{geometry.y},#{geometry.x},12z\" target=\"blank\">#{geometry.to_s}</a>"
|
54
|
+
end
|
55
55
|
end
|
56
56
|
val_err || val
|
57
57
|
else
|
@@ -1760,14 +1760,17 @@ end
|
|
1760
1760
|
<tr><td<%= ' class=\"orphan\"'.html_safe if err_msg %>><%= err_msg || '(none)' %></td></tr>
|
1761
1761
|
<% else
|
1762
1762
|
collection2.each do |br_#{hm_singular_name}| %>
|
1763
|
-
<tr><td><%= br_descrip = if br_#{hm_singular_name}.respond_to?(
|
1763
|
+
<tr><td><%= br_descrip = if (dc = descrip_cols&.first&.first&.last) && br_#{hm_singular_name}.respond_to?(dc)
|
1764
1764
|
br_#{hm_singular_name}.brick_descrip(
|
1765
1765
|
descrip_cols&.first&.map { |col| br_#{hm_singular_name}.send(col.last) }
|
1766
1766
|
)
|
1767
1767
|
else # If the HM association has a scope, might not have picked up our SELECT detail
|
1768
1768
|
pks = (klass = br_#{hm_singular_name}.class).primary_key
|
1769
|
-
pks =
|
1770
|
-
|
1769
|
+
pks = if pks.is_a?(Array)
|
1770
|
+
pks.map { |pk| br_#{hm_singular_name}.send(pk).to_s }
|
1771
|
+
else
|
1772
|
+
[br_#{hm_singular_name}.send(pks).to_s]
|
1773
|
+
end
|
1771
1774
|
\"#\{klass.name} ##\{pks.join(', ')}\"
|
1772
1775
|
end
|
1773
1776
|
link_to(br_descrip, #{hm.first.klass._brick_index(:singular)}_path(slashify(#{obj_br_pk}))) %></td></tr>
|
@@ -104,7 +104,7 @@ module Brick::Rails::FormBuilder
|
|
104
104
|
out << "<div id=\"_br_json_#{self.field_id(method)}\"></div>"
|
105
105
|
else
|
106
106
|
is_revert = false
|
107
|
-
out << ::Brick::Rails.display_value(col_type, val)
|
107
|
+
out << (::Brick::Rails.display_value(col_type, val)&.html_safe || '')
|
108
108
|
end
|
109
109
|
end
|
110
110
|
if is_revert
|
data/lib/brick/version_number.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: brick
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.149
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lorin Thwaits
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-06-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|