brick 1.0.164 → 1.0.166

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: 954b8c68167f01f4c6c05b2a9e7f0956122001e72523c5c2222b7da97370f11c
4
- data.tar.gz: 944590e83681412d1fe30133e3ce6407e7eda8636c4c1eb5d5baed12423d190e
3
+ metadata.gz: 04daac2a29417d6243839a369b82f47ce12b380e53751a8f2374239962af887e
4
+ data.tar.gz: ff3c520f128963490cfbae81aee29ac3875bc819df113ad29cef09b625d0275b
5
5
  SHA512:
6
- metadata.gz: 2d12b53be830841e54f14ac6e860b0cc38a7ad830a8e83bb9ac4c35023f4b98d12b2e37efe9964b10c94bded717b4cedb8f32b51ce64d8d71020a654ec1357b4
7
- data.tar.gz: a2474cf50a27f0af680bff905cfe58d27dc3b8e068babbf0d49d1238dde7b11ae33dd8b8a9601fec1e7e26cc6e12f116cc8bfe276705655c1f339b6d92b3af86
6
+ metadata.gz: 10e4983d3ebcc5e965e85784b38e3eff05b30a05fb46dd442560fc8845d097f95b3b3f4b4662e70238983b3f948c83647acc4919f521f49f9405b7f5bd71895d
7
+ data.tar.gz: 56e5e5afa63fa991321881dc0b2c703ddd2d4a0b88d5856db3b272e36ad66abdfe1ea89e8d203ba6c56851a3ca4727c3e8c68daadc43888d59fea2ff095961ae
@@ -2002,7 +2002,7 @@ document.querySelectorAll(\"input, select\").forEach(function (inp) {
2002
2002
  send(:root, action)
2003
2003
  end
2004
2004
  end
2005
- ::Brick.established_drf = "/#{::Brick.config.path_prefix}#{'#index' unless route.index('#')}"
2005
+ ::Brick.established_drf = "/#{::Brick.config.path_prefix}#{action[action.index('#')..-1]}"
2006
2006
  end
2007
2007
  end
2008
2008
 
@@ -61,29 +61,34 @@ module Brick::Rails::FormTags
61
61
  end
62
62
  sequence.reject! { |nm| exclusions.include?(nm) } if exclusions
63
63
  out << sequence.each_with_object(+'') do |col_name, s|
64
- s << '<th '
64
+ s << '<th'
65
65
  if (col = cols[col_name]).is_a?(ActiveRecord::ConnectionAdapters::Column)
66
- s << "title=\"#{col.comment}\" " if col.respond_to?(:comment) && !col.comment.blank?
66
+ s << " title=\"#{col.comment}\"" if col.respond_to?(:comment) && !col.comment.blank?
67
67
  s << if (bt = bts[col_name])
68
68
  # Allow sorting for any BT except polymorphics
69
- "x-order=\"#{bt.first.to_s + '"' unless bt[2]}>BT " +
70
- bt[1].map { |bt_pair| bt_pair.first.bt_link(bt.first) }.join(' ')
69
+ x_order = " x-order=\"#{bt.first.to_s + '"'}" unless bt[2]
70
+ "#{x_order}>BT #{bt[1].map { |bt_pair| bt_pair.first.bt_link(bt.first) }.join(' ')}"
71
71
  else # Normal column
72
72
  col_name_humanised = klass.human_attribute_name(col_name, { default: col_name })
73
- "x-order=\"#{col_name + '"' if true}>#{col_name_humanised}"
73
+ x_order = " x-order=\"#{col_name}\"" if true
74
+ "#{x_order}>#{col_name_humanised}"
74
75
  end
75
76
  elsif col # HM column
76
77
  options = {}
77
78
  options[col[1].inheritance_column] = col[1].name unless col[1] == col[1].base_class
78
- s << "x-order=\"#{col_name + '"' if true}>#{col[2]} "
79
+ x_order = " x-order=\"#{col_name}\"" if true
80
+ s << "#{x_order}>#{col[2]} "
79
81
  s << (col.first ? "#{col[3]}" : "#{link_to(col[3], send("#{col[1]._brick_index}_path", options))}")
80
82
  elsif cust_cols.key?(col_name) # Custom column
81
- s << "x-order=\"#{col_name}\">#{col_name}"
83
+ x_order = " x-order=\"#{col_name}\"" if true
84
+ s << "#{x_order}>#{col_name}"
82
85
  elsif col_name.is_a?(Symbol) && (hot = bts[col_name]) # has_one :through
83
- s << "x-order=\"#{hot.first.to_s}\">HOT " +
86
+ x_order = " x-order=\"#{hot.first.to_s}\"" if true
87
+ s << "#{x_order}>HOT " +
84
88
  hot[1].map { |hot_pair| hot_pair.first.bt_link(col_name) }.join(' ')
85
89
  elsif (bt = composite_bt_names[col_name])
86
- s << "x-order=\"#{bt.first.to_s + '"' unless bt[2]}>BT comp " +
90
+ x_order = " x-order=\"#{bt.first.to_s}\"" unless bt[2]
91
+ s << "#{x_order}>BT comp " +
87
92
  bt[1].map { |bt_pair| bt_pair.first.bt_link(bt.first) }.join(' ')
88
93
  else # Bad column name!
89
94
  s << "title=\"<< Unknown column >>\">#{col_name}"
@@ -5,7 +5,7 @@ module Brick
5
5
  module VERSION
6
6
  MAJOR = 1
7
7
  MINOR = 0
8
- TINY = 164
8
+ TINY = 166
9
9
 
10
10
  # PRE is nil unless it's a pre-release (beta, RC, etc.)
11
11
  PRE = nil
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: brick
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.164
4
+ version: 1.0.166
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lorin Thwaits