tybo 0.0.13 → 0.0.14

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: 2159c6fe429376273f6ba05ab4009d6714a61c09a2fe9d9ad5395c23ad679f69
4
- data.tar.gz: fedf0c5fc19e0d446fa3ce7ba4d32d8bf6aaf82b64b6138a1fef740cf8bc8c48
3
+ metadata.gz: f3e1659738fc5081c5c1f749ee9f5319bda7d3a6c14e00057f6bda6c637080fc
4
+ data.tar.gz: b1c45b98c8a241ee91fa5b3a8a6d8b0be15d5f7fae59c7678b7f2f42480af442
5
5
  SHA512:
6
- metadata.gz: 02e9964ddfc462d39f6f4b112bf255036fe5a6fd76e6a40cf88cefa407f5ab7349a7c9b5e5707a38a5daa627fb676cef6789f7ca7367182846351e47b5202ada
7
- data.tar.gz: d3d971269635d970e6b1d692b3c5ee489eb948b074eb1c93d01c092d8faba236d6e06fcee2d92f5220ea29514fa3d45097f84552d3e9753a1696cfbb793f4764
6
+ metadata.gz: 40755097ff8fc2b01d7f49e189645c548cea5c3d32bc12df6e3d4f6b498649e0a541f4a4dcbc0dd54e748539b1acb013fab0aa6cfe2b24471ae53f5a28637739
7
+ data.tar.gz: 62597ee9ddf4815d0029e5be88ec1c515c4d8de5959b51e3f7392acfc35d49c8c3203422fbe6e9a5ee1326d53ab212a6b8ab0b96fc688624bf0617b4be3c28fa
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Tybo
2
4
  class ApplicationController < ActionController::Base
3
5
  end
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  class Tybo::LoginController < ::ApplicationController
3
4
  layout 'devise_admin'
4
5
  def home
@@ -69,7 +69,7 @@ class BoGenerator < Rails::Generators::NamedBase
69
69
 
70
70
  def permited_params
71
71
  params = {}
72
- action_text_columns= has_one_assoc&.select {|a| a.options[:class_name] == 'ActionText::RichText'}
72
+ action_text_columns = has_one_assoc&.select { |a| a.options[:class_name] == 'ActionText::RichText' }
73
73
  model_columns&.map do |col|
74
74
  params["#{col}".to_sym] = nil
75
75
  end
@@ -82,7 +82,7 @@ class BoGenerator < Rails::Generators::NamedBase
82
82
  has_one_assoc&.map do |association|
83
83
  next if association.options[:class_name] == 'ActionText::RichText'
84
84
 
85
- attributes = association.klass.column_names.map(&:to_sym).delete_if {|attr| excluded_columns.include?(attr)}
85
+ attributes = association.klass.column_names.map(&:to_sym).delete_if { |attr| excluded_columns.include?(attr) }
86
86
  params["#{association.name.to_s.singularize}_attributes".to_sym] = attributes
87
87
  end
88
88
  params
@@ -2,7 +2,7 @@
2
2
  <!-- Model columns -->
3
3
  <%- bo_model.column_names.each do |column| -%>
4
4
  <%- next if excluded_columns.include?(column.to_sym) || bo_model.reflect_on_all_associations.map(&:foreign_key).include?(column) -%>
5
- <%%= f.input :<%= column %> %>
5
+ <%%= f.input :<%= column %>,label: I18n.t('bo.<%= class_name.underscore %>.attributes.<%= column %>') %>
6
6
  <%- end -%>
7
7
  <!-- belongs_to Associations -->
8
8
  <%- belongs_to_assoc.each do |association| -%>
@@ -1,27 +1,27 @@
1
1
  module Bo
2
2
  class <%= options[:namespace].camelize %>Policy < ActionPolicy::Base
3
3
  def show?
4
- true
4
+ raise "Add custom policy scope in #{__FILE__}"
5
5
  end
6
6
 
7
7
  def new?
8
- true
8
+ raise "Add custom policy scope in #{__FILE__}"
9
9
  end
10
10
 
11
11
  def edit?
12
- true
12
+ raise "Add custom policy scope in #{__FILE__}"
13
13
  end
14
14
 
15
15
  def create?
16
- true
16
+ raise "Add custom policy scope in #{__FILE__}"
17
17
  end
18
18
 
19
19
  def update?
20
- true
20
+ raise "Add custom policy scope in #{__FILE__}"
21
21
  end
22
22
 
23
23
  def destroy?
24
- true
24
+ raise "Add custom policy scope in #{__FILE__}"
25
25
  end
26
26
 
27
27
  relation_scope(&:all)
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class BoNamespaceGenerator < Rails::Generators::NamedBase
2
4
  source_root File.expand_path("templates", __dir__)
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Bo
2
4
  class <%= class_name %>Policy < ActionPolicy::Base
3
5
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  Tybo.configure do |config|
2
4
  # customise logo and cover url
3
5
  # should be an external url or image should be present in (app/assets/images)
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
 
2
3
  class TyboInstallGenerator < Rails::Generators::Base
3
4
  source_root File.expand_path("templates", __dir__)
data/lib/tybo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Tybo
2
- VERSION = '0.0.13'
2
+ VERSION = '0.0.14'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tybo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.13
4
+ version: 0.0.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michel Delpierre
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2023-02-14 00:00:00.000000000 Z
12
+ date: 2023-02-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails