Module: Railsui::FrameworkHelper
- Defined in:
- app/helpers/railsui/framework_helper.rb
Instance Method Summary collapse
- #framework_version ⇒ Object
- #framework_version_label ⇒ Object
- #system_pagination(options = {}) ⇒ Object
Instance Method Details
#framework_version ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 |
# File 'app/helpers/railsui/framework_helper.rb', line 7 def framework_version package_version = nil version = File.open(Rails.root.join("package.json")) do |f| f.each_line do |line| if line =~ /"tailwindcss"/ package_version = line.match(/(?<=\")[^\"]*\d+\.\d+\.\d+[^\s,\"]*/)[0] end end end package_version end |
#framework_version_label ⇒ Object
3 4 5 |
# File 'app/helpers/railsui/framework_helper.rb', line 3 def framework_version_label content_tag :div, framework_version, class: "bg-slate-200 rounded-full px-2 py-px font-semibold text-xs flex items-center dark:bg-slate-700 dark:text-slate-100" end |
#system_pagination(options = {}) ⇒ Object
19 20 21 |
# File 'app/helpers/railsui/framework_helper.rb', line 19 def system_pagination(={}) render partial: "railsui/shared/pagination", locals: end |