Module: RailsAdmin::AbstractModel::GenericSupport
- Defined in:
- lib/rails_admin/generic_support.rb
Instance Method Summary collapse
Instance Method Details
#pretty_name ⇒ Object
10 11 12 |
# File 'lib/rails_admin/generic_support.rb', line 10 def pretty_name model.model_name.human end |
#to_param ⇒ Object
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 |