angsa 0.1.0 → 0.1.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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 20dd53a23658347fea0bbc51f22c91b910dffdb5ea864e42bfe38396c2cd8760
|
|
4
|
+
data.tar.gz: ac28aa4477c0457ccb0e95a1510ea2b68535e142f999632ce1d3c3870579ea1a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8ea8df94a555f422644edc334b32a46eb13d245461b4a57fb68184cab1f35718cf0aa2f0c98b977f2a4db1c776b7983916b8e52dc8ae2ff724bc3b5b7264b58a
|
|
7
|
+
data.tar.gz: 4823d4ff30ef886a028aa2a7b4640562f278083b9dee754dab781f869a4d136c3cbb78ea2158860717f7011fe3878a28ec8c7d073f612d50bf2f9174828f9952
|
data/lib/angsa/version.rb
CHANGED
|
@@ -5,10 +5,11 @@ export default class <%= stimulus_controller_name %> extends AngsaGridjsControll
|
|
|
5
5
|
columnsConfig(){
|
|
6
6
|
// TODO: Return the appropriate columns for your model
|
|
7
7
|
return [
|
|
8
|
-
<%= @columns.map { |column|
|
|
8
|
+
<%= @columns.map { |column| " \"#{column}\"" }.join(",\n") %>
|
|
9
9
|
// {
|
|
10
10
|
// name: 'Actions',
|
|
11
|
-
//
|
|
11
|
+
// sort: false,
|
|
12
|
+
// formatter: (_, row) => html(`<a href='${this.apiUrl().replace('.json', '')}/${row.cells[<%= @columns.size - 1 %>].data}'><i class='far fa-arrow-alt-circle-right'></></a>`)
|
|
12
13
|
// },
|
|
13
14
|
]
|
|
14
15
|
|
|
@@ -9,6 +9,10 @@ class <%= model_class_name %> < Angsa::Base
|
|
|
9
9
|
# { name: :id, source: 'id', searchable: false, type: :integer },
|
|
10
10
|
# { name: :name, source: 'name', searchable: true, type: :string },
|
|
11
11
|
# { name: :available, source: 'available', searchable: true, type: :boolean },
|
|
12
|
+
|
|
13
|
+
# Actions: Important! Declare either id or slug
|
|
14
|
+
# { name: :id, source: 'id', searchable: false, type: :integer },
|
|
15
|
+
# { name: :slug, source: 'slug', searchable: false, type: :integer },
|
|
12
16
|
]
|
|
13
17
|
end
|
|
14
18
|
end
|