Sha256: f52f3abb76e4265ca24628fe3ba848f01516ccf1a6b056afdf4baa081ddafb41

Contents?: true

Size: 248 Bytes

Versions: 6

Compression:

Stored size: 248 Bytes

Contents

module MerbAdmin
  class AbstractModel
    module GenericSupport
      def to_param
        model.to_s.snake_case.gsub("::", "__")
      end

      def pretty_name
        model.to_s.snake_case.gsub('_', ' ').capitalize
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
merb-admin-0.7.2 lib/generic_support.rb
merb-admin-0.7.1 lib/generic_support.rb
merb-admin-0.7.0 lib/generic_support.rb
merb-admin-0.6.9 lib/generic_support.rb
merb-admin-0.6.8 lib/generic_support.rb
merb-admin-0.6.7 lib/generic_support.rb