Sha256: faa6131d8c1d731ee8d6982aa49a98732f525d46cdaf69753afed2df436a30f7
Contents?: true
Size: 486 Bytes
Versions: 8
Compression:
Stored size: 486 Bytes
Contents
# frozen_string_literal: true module ApplicationHelper def body_id ctrl_name = controller_path.gsub(%r{^v\d+/}, '').tr('/', '-') [ctrl_name, action_name].map(&:dasherize).join('-') end def body_class controller_path.gsub(%r{^v\d+/}, '').tr('/', '-').dasherize end def body_data_controller @body_data_controller ||= controller_name.tr('_', '-').split('/').join('-') end def sort_opt(model, column) { model: model, column: column }.to_json end end
Version data entries
8 entries across 8 versions & 1 rubygems