Sha256: 63d5b8d29356adaf66bed2aefee4142784886397439d57b3fa651ed27d9a44e8

Contents?: true

Size: 312 Bytes

Versions: 5

Compression:

Stored size: 312 Bytes

Contents

module MerbAdmin
  class AbstractModel
    module GenericSupport
      def singular_name
        model.to_s.snake_case.to_sym
      end

      def plural_name
        model.to_s.snake_case.pluralize.to_sym
      end

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

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
sferik-merb-admin-0.3.1 lib/generic_support.rb
sferik-merb-admin-0.3.2 lib/generic_support.rb
sferik-merb-admin-0.3.3 lib/generic_support.rb
sferik-merb-admin-0.3.4 lib/generic_support.rb
sferik-merb-admin-0.3.6 lib/generic_support.rb