lightek_vpm 0.4.0 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f627ee188568a19bac737b2376624fba4659aeee16d15f99d71560d43c284cf8
|
4
|
+
data.tar.gz: f263418db79f5540875159ea210f9797681f07f990317cc043a887f1227aedb6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 86df1b8530e74f64e0f416aaaaa82e2c8720e67bedb4aff7e62a1c7f452b8acb6445793fea51af64a00e8f3d0e5fa6e5aaeead78d229374c4250fbcf0b7e4c03
|
7
|
+
data.tar.gz: 74e7079728533d82e48934d6ec72a9fc895e76f0be338db24239921e4261bb60aff9f7e75373f46cb5a641f10976e9598c6b158a644d9792fdafa1732a746835
|
@@ -5,6 +5,7 @@ module LightekVpm
|
|
5
5
|
module Generators
|
6
6
|
# Custom scaffolding generator
|
7
7
|
class ControllerGenerator < Rails::Generators::NamedBase
|
8
|
+
source_root File.expand_path('../templates', __FILE__)
|
8
9
|
include Rails::Generators::ResourceHelpers
|
9
10
|
class_option :skip_show, type: :boolean, default: false, desc: 'Skip "show" action'
|
10
11
|
|
@@ -13,11 +13,14 @@ attr_accessor :options, :attributes
|
|
13
13
|
end
|
14
14
|
end
|
15
15
|
|
16
|
-
|
17
|
-
|
18
|
-
|
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)
|
data/lib/lightek_vpm/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lightek_vpm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marlon Henry
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-05-
|
11
|
+
date: 2024-05-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sassc-rails
|