lightek_vpm 0.4.1 → 0.4.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: f822d40932a408a0e06ae5fc973840af2baa01dc24a57667e097bd0b8533660c
4
- data.tar.gz: 1d3df8921c6b0e4bc65a22c005c7ae88e8ea6383992dd20b3d481506e486d11b
3
+ metadata.gz: f627ee188568a19bac737b2376624fba4659aeee16d15f99d71560d43c284cf8
4
+ data.tar.gz: f263418db79f5540875159ea210f9797681f07f990317cc043a887f1227aedb6
5
5
  SHA512:
6
- metadata.gz: 35cb44cdb32421d5311c330d2fd4358762a0067704547572b97f309a6eff0cfed7b2b261ec83194d70b23600c0dd5045319ecc2f16f9fee3ec1eca8893c1f27a
7
- data.tar.gz: af7f97717a5322e75c5709d99cb6683f3963ba78de394bc54f5ebaecb78a10085887e4671f6386162067c2829295c972ec4971bb1d2f0f9f8f24801690eabf7a
6
+ metadata.gz: 86df1b8530e74f64e0f416aaaaa82e2c8720e67bedb4aff7e62a1c7f452b8acb6445793fea51af64a00e8f3d0e5fa6e5aaeead78d229374c4250fbcf0b7e4c03
7
+ data.tar.gz: 74e7079728533d82e48934d6ec72a9fc895e76f0be338db24239921e4261bb60aff9f7e75373f46cb5a641f10976e9598c6b158a644d9792fdafa1732a746835
@@ -13,11 +13,14 @@ attr_accessor :options, :attributes
13
13
  end
14
14
  end
15
15
 
16
- def editable_attributes
17
- attributes ||= model_columns_for_attributes.map do |column|
18
- Rails::Generators::GeneratedAttribute.new(column.name.to_s, column.type.to_s)
16
+ def editable_attributes
17
+ model_columns = class_name.constantize.columns
18
+ model_columns.reject { |c| %w[id created_at updated_at].include?(c.name) }
19
+ end
20
+
21
+ def editable_attribute_names
22
+ editable_attributes.map(&:name).map { |attr| ":#{attr}" }.join(', ')
19
23
  end
20
- end
21
24
 
22
25
  def view_files
23
26
  actions = %w(index new edit _form)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module LightekVpm
4
- VERSION = "0.4.1"
4
+ VERSION = "0.4.2"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lightek_vpm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marlon Henry