Sha256: e814ef51c231a89d32965260503ed9e724943580ff73082ed5fb00676f6ed328

Contents?: true

Size: 320 Bytes

Versions: 6

Compression:

Stored size: 320 Bytes

Contents

module ActiveAdmin::SortableTree
  class Compatibility
    def self.normalized_resource_name(resource_name)
      if Rails::VERSION::MAJOR >= 5
        resource_name.to_s.underscore.parameterize(separator: "_".freeze)
      else
        resource_name.to_s.underscore.parameterize("_".freeze)
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
active_admin-sortable_tree-2.1.0 lib/active_admin/sortable_tree/compatibility.rb
rs-active_admin-sortable_tree-2.2.1 lib/active_admin/sortable_tree/compatibility.rb
rs-active_admin-sortable_tree-2.2.0 lib/active_admin/sortable_tree/compatibility.rb
rs-active_admin-sortable_tree-2.1.0 lib/active_admin/sortable_tree/compatibility.rb
active_admin-sortable_tree-2.0.0 lib/active_admin/sortable_tree/compatibility.rb
active_admin-sortable_tree-1.0.0 lib/active_admin/sortable_tree/compatibility.rb