tybo 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/generators/bo_namespace/templates/admin.html.erb +1 -1
- data/lib/generators/bo_namespace/templates/admin_controller.rb +19 -4
- data/lib/generators/tybo_install/templates/tailwind.config.js +1 -1
- data/lib/generators/tybo_install/tybo_install_generator.rb +1 -2
- data/lib/tybo/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a4ce3d25216a414e0297531f8df01f18a84a85fa6524a0afe9870593638bd8a8
|
4
|
+
data.tar.gz: 790ae5fab45c4ebc681f5bcfb098b5f0fcf729792198a8f7d1e24f9f6aefc1e6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc06cdbe9bd43d986aae83338f864c83f82ebfd6e5b6623ab6d019474119b00ced0e4a93b1d7f0a40da2827293b977cc42db3e7cdc6da2f817fe7b7026e4e0ca
|
7
|
+
data.tar.gz: 396dc2d7a54ae8eb1dd7dd7b881b02d47131b7ec7bf4fc697da18f12c9a8131455fdda83e1a2455c6872f8da74ce3b6a3076d6a69b1a34f0560b5b4ee0e17804
|
@@ -3,13 +3,28 @@ require 'csv'
|
|
3
3
|
|
4
4
|
class <%= class_name %>Controller < ApplicationController
|
5
5
|
include Pagy::Backend
|
6
|
-
layout '
|
7
|
-
before_action :
|
8
|
-
authorize :user, through: :
|
6
|
+
layout 'administrator'
|
7
|
+
before_action :authenticate_administrator!, :set_default_locale
|
8
|
+
authorize :user, through: :current_administrator
|
9
9
|
|
10
10
|
private
|
11
11
|
|
12
12
|
def namespace
|
13
|
-
@namespace ||= Bo
|
13
|
+
@namespace ||= Bo::Administrators
|
14
|
+
end
|
15
|
+
|
16
|
+
def set_default_locale
|
17
|
+
I18n.default_locale = :fr
|
18
|
+
end
|
19
|
+
|
20
|
+
protected
|
21
|
+
|
22
|
+
# Devise routing overwrite for multiples resources
|
23
|
+
def after_sign_in_path_for(resource)
|
24
|
+
send(:"#{resource.class.name.underscore.pluralize}_root_path")
|
25
|
+
end
|
26
|
+
|
27
|
+
def after_sign_out_path_for(resource)
|
28
|
+
send(:"new_#{resource}_session_path")
|
14
29
|
end
|
15
30
|
end
|
@@ -3,7 +3,7 @@
|
|
3
3
|
class TyboInstallGenerator < Rails::Generators::Base
|
4
4
|
source_root File.expand_path("templates", __dir__)
|
5
5
|
require_relative "./utils/translations.rb"
|
6
|
-
|
6
|
+
|
7
7
|
def install_dependencies
|
8
8
|
run './bin/bundle add tailwindcss-rails' unless Bundler.locked_gems.specs.any? { |gem| gem.name == 'tailwindcss-rails' }
|
9
9
|
gem 'simple_form' unless Bundler.locked_gems.specs.any? { |gem| gem.name == 'simple_form' }
|
@@ -55,4 +55,3 @@ class TyboInstallGenerator < Rails::Generators::Base
|
|
55
55
|
end
|
56
56
|
end
|
57
57
|
end
|
58
|
-
|
data/lib/tybo/version.rb
CHANGED
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tybo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michel Delpierre
|
8
8
|
- Julien Camblan
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2024-
|
12
|
+
date: 2024-11-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -285,7 +285,7 @@ licenses:
|
|
285
285
|
- MIT
|
286
286
|
metadata:
|
287
287
|
homepage_uri: https://rubygems.org/gems/tybo
|
288
|
-
post_install_message:
|
288
|
+
post_install_message:
|
289
289
|
rdoc_options: []
|
290
290
|
require_paths:
|
291
291
|
- lib
|
@@ -300,8 +300,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
300
300
|
- !ruby/object:Gem::Version
|
301
301
|
version: '0'
|
302
302
|
requirements: []
|
303
|
-
rubygems_version: 3.
|
304
|
-
signing_key:
|
303
|
+
rubygems_version: 3.0.3.1
|
304
|
+
signing_key:
|
305
305
|
specification_version: 4
|
306
306
|
summary: A tailwind custom admin engine for Ruby on Rails
|
307
307
|
test_files: []
|