Sha256: ed0b238f8bd5b20518192f80aa401b5d5a930bda24031a5d5bcd475ff9b655c0

Contents?: true

Size: 323 Bytes

Versions: 26

Compression:

Stored size: 323 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('_', ' ').capitalize
      end
    end
  end
end

Version data entries

26 entries across 26 versions & 2 rubygems

Version Path
sferik-merb-admin-0.4.0 lib/generic_support.rb
sferik-merb-admin-0.4.1 lib/generic_support.rb
sferik-merb-admin-0.4.2 lib/generic_support.rb
sferik-merb-admin-0.4.3 lib/generic_support.rb
merb-admin-0.6.6 lib/generic_support.rb
merb-admin-0.6.5 lib/generic_support.rb
merb-admin-0.6.4 lib/generic_support.rb
merb-admin-0.6.3 lib/generic_support.rb
merb-admin-0.6.2 lib/generic_support.rb
merb-admin-0.6.1 lib/generic_support.rb
merb-admin-0.6.0 lib/generic_support.rb
merb-admin-0.5.7 lib/generic_support.rb
merb-admin-0.5.6 lib/generic_support.rb
merb-admin-0.5.5 lib/generic_support.rb
merb-admin-0.5.4 lib/generic_support.rb
merb-admin-0.5.3 lib/generic_support.rb
merb-admin-0.5.2 lib/generic_support.rb
merb-admin-0.5.1 lib/generic_support.rb
merb-admin-0.5.0 lib/generic_support.rb
merb-admin-0.4.9 lib/generic_support.rb