Module: RailsAdmin::AbstractModel::GenericSupport

Defined in:
lib/rails_admin/generic_support.rb

Instance Method Summary collapse

Instance Method Details

#pretty_nameObject



10
11
12
# File 'lib/rails_admin/generic_support.rb', line 10

def pretty_name
  model.model_name.human
end

#to_paramObject



5
6
7
8
# File 'lib/rails_admin/generic_support.rb', line 5

def to_param
  parts = model.to_s.split("::")
  parts.map{|x| x == parts.last ? x.underscore.pluralize : x.underscore}.join("~")
end