airview 0.2.0 → 0.2.1

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: 4698348a323226676e3caba98313791047e11f6ca61d5481c4161e93b72df435
4
- data.tar.gz: 991db64ebdb3d015d6a57b7f2cc008b9d1bdad64cca67f2b87727f6aa7533be1
3
+ metadata.gz: cb78580c25d95852c620a000b7004b72eb1fb97ee18e0c724ba73c8a080d64f6
4
+ data.tar.gz: 8bf65718430375504b1ff3faa7941e3b40ee7a14d93446551b264919f51b99b8
5
5
  SHA512:
6
- metadata.gz: 057bac0d19e8c39a2e1238eab49cf778d84dffb742ea7e67abb1e50622cbdbd8539b55b71b661f117598f60dd3efeec1141838aa9d2aff08801cdd9410d1fe8d
7
- data.tar.gz: f276cd3b707856ee4b2b3b0e554d4dda4cead471cb6de46aacc64f0474af45d06cf538f16255ff86abd3a6cf3f62435444937ac9a917d29cf903e96aa3da1b26
6
+ metadata.gz: 241dc17630004523a43965e727c5c5c70651bcc68d9d697cf31f8257711383244a6fc44d64ce3f3a5c94f9ca0aa872f153f3aacd3010241a18baaa6eebf4846a
7
+ data.tar.gz: 2412d9f6f290665d41e939b53691db2627c0bc4f4f303440f0ea19591a0e11ed62aac590764582d69e4a1619ae19e8817967d878ffa32ee8a5c3714c92666d28
@@ -193,8 +193,8 @@ module Airview
193
193
 
194
194
  def filter_conditions
195
195
  request_filters = params[:filters]
196
- return [] if params.key?(:filters_present)
197
196
  return normalized_filters(request_filters) if request_filters.present?
197
+ return [] if params.key?(:filters_present)
198
198
  return normalized_filters(@active_view.filters) if @active_view&.filters.present?
199
199
 
200
200
  []
@@ -49,7 +49,14 @@
49
49
  <%= form.fields_for :field_definitions do |field_form| %>
50
50
  <% stale = field_form.object.stale? %>
51
51
  <tr>
52
- <td><%= field_form.check_box :visible, disabled: stale %></td>
52
+ <td>
53
+ <% if stale %>
54
+ <%= field_form.hidden_field :visible, value: "0" %>
55
+ <%= check_box_tag nil, "1", false, disabled: true %>
56
+ <% else %>
57
+ <%= field_form.check_box :visible %>
58
+ <% end %>
59
+ </td>
53
60
  <td><%= field_form.check_box :read_only %></td>
54
61
  <td>
55
62
  <%= field_form.hidden_field :id if field_form.object.persisted? %>
@@ -17,7 +17,9 @@ module Airview
17
17
  next if existing_names.include?(attributes[:name].to_s)
18
18
 
19
19
  position += 1
20
- definition.field_definitions.create!(attributes.merge(position:))
20
+ definition.field_definitions.create!(
21
+ attributes.merge(position:, read_only: attributes[:read_only] ? true : false)
22
+ )
21
23
  added_count += 1
22
24
  end
23
25
 
@@ -165,7 +165,7 @@ module Airview
165
165
  end
166
166
 
167
167
  def inferred_readonly?(column, association)
168
- readonly?(column) || unsupported_association?(association)
168
+ readonly?(column) || !!unsupported_association?(association)
169
169
  end
170
170
 
171
171
  def readonly?(column)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Airview
4
- VERSION = "0.2.0"
4
+ VERSION = "0.2.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: airview
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - jacksonriso