Module: Railsui
- Defined in:
- app/controllers/railsui/routes_controller.rb,
lib/railsui.rb,
lib/railsui/pages.rb,
lib/railsui/engine.rb,
lib/railsui/themes.rb,
lib/railsui/version.rb,
lib/railsui/theme_setup.rb,
lib/railsui/form_builder.rb,
lib/railsui/theme_helper.rb,
lib/railsui/configuration.rb,
app/models/railsui/default.rb,
lib/railsui/meta_tags_helper.rb,
app/helpers/railsui/mail_helper.rb,
app/helpers/railsui/framework_helper.rb,
app/models/railsui/application_record.rb,
app/helpers/railsui/application_helper.rb,
app/controllers/railsui/admin_controller.rb,
app/controllers/railsui/pages_controller.rb,
app/controllers/railsui/default_controller.rb,
app/controllers/railsui/systems_controller.rb,
app/controllers/railsui/application_controller.rb,
lib/generators/railsui/update/update_generator.rb,
app/controllers/railsui/systems/forms_controller.rb,
app/controllers/railsui/systems/pages_controller.rb,
lib/generators/railsui/install/install_generator.rb,
app/controllers/railsui/configurations_controller.rb,
app/controllers/railsui/systems/content_controller.rb,
app/controllers/railsui/systems/helpers_controller.rb,
app/controllers/railsui/systems/mailers_controller.rb,
lib/generators/railsui/scaffold/scaffold_generator.rb,
app/controllers/railsui/systems/components_controller.rb,
app/controllers/railsui/systems/authentication_controller.rb,
app/controllers/railsui/systems/authentication/devise_controller.rb,
app/controllers/railsui/systems/authentication/static_controller.rb
Overview
Defined Under Namespace
Modules: ApplicationHelper, FrameworkHelper, Generators, MailHelper, MetaTagsHelper, Pages, Systems, ThemeHelper, ThemeSetup, Themes
Classes: AdminController, ApplicationController, ApplicationRecord, Configuration, ConfigurationsController, Default, DefaultController, Engine, FormBuilder, PagesController, RoutesController, SystemsController
Constant Summary
collapse
- VERSION =
"3.4.3"
- @@config =
Railsui::Configuration.new
Class Method Summary
collapse
Class Method Details
.asset_url ⇒ Object
57
58
59
|
# File 'lib/railsui.rb', line 57
def self.asset_url
"https://f001.backblazeb2.com/file/railsui"
end
|
.build_css ⇒ Object
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
# File 'lib/railsui.rb', line 32
def self.build_css
if defined?(Tailwindcss)
run_command "rails tailwindcss:build"
css_file = Rails.root.join("app/assets/builds/tailwind.css")
if File.exist?(css_file)
FileUtils.touch(css_file)
end
else
puts "tailwindcss-rails gem not found. Please install it to build CSS."
end
end
|
.bundle ⇒ Object
28
29
30
|
# File 'lib/railsui.rb', line 28
def self.bundle
run_command "bundle"
end
|
.clear ⇒ Object
20
21
22
|
# File 'lib/railsui.rb', line 20
def self.clear
run_command "rails tmp:clear"
end
|
.restart ⇒ Object
24
25
26
|
# File 'lib/railsui.rb', line 24
def self.restart
run_command "rails restart"
end
|
.run_command(command) ⇒ Object
61
62
63
64
65
|
# File 'lib/railsui.rb', line 61
def self.run_command(command)
Bundler.with_original_env do
system command
end
end
|
.theme_logo_url ⇒ Object
47
48
49
50
51
52
53
54
55
|
# File 'lib/railsui.rb', line 47
def self.theme_logo_url
theme = Railsui.config.theme
file_extension = if defined?(Rails.application) && Rails.application.config.action_mailer
"png"
else
"svg"
end
"https://f001.backblazeb2.com/file/railsui/themes/#{theme}/logo.#{file_extension}"
end
|