Flowdock
method

new

Importance_0
v6.0.0 - Show latest stable - 0 notes - Class: ModelHelpers
new(args, *_options) public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File railties/lib/rails/generators/model_helpers.rb, line 20
      def initialize(args, *_options)
        super
        if name == name.pluralize && name.singularize != name.pluralize && !options[:force_plural]
          singular = name.singularize
          unless ModelHelpers.skip_warn
            say PLURAL_MODEL_NAME_WARN_MESSAGE % [name, singular]
          end
          name.replace singular
          assign_names!(name)
        end
        if name.singularize != name.pluralize.singularize && ! ModelHelpers.skip_warn
          say IRREGULAR_MODEL_NAME_WARN_MESSAGE % [name.pluralize]
        end
        ModelHelpers.skip_warn = true
      end
Register or log in to add new notes.